Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local module = {}
- local collidersParent = {
- --LOBBY
- workspace.LobbyPlate.Lobby.Home.Colliders,
- workspace.LobbyPlate.Lobby.PowerUpShop.Colliders,
- workspace.LobbyPlate.Lobby.TauntShop.Colliders,
- workspace.LobbyPlate.Lobby.ClothesShop.Colliders,
- workspace.LobbyPlate.Lobby.PetShop.Colliders,
- workspace.LobbyPlate.Lobby.MainCollider,
- --Backyard
- game.ReplicatedStorage.Rooms.Backyard.Root.MeshPart_1.Colliders,
- game.ReplicatedStorage.Rooms.Backyard.Root.MeshPart_2.Colliders,
- game.ReplicatedStorage.Rooms.Backyard.Root.MeshPart_3.Colliders,
- game.ReplicatedStorage.Rooms.Backyard.Root.MeshPart_4.Colliders,
- --Basement
- game.ReplicatedStorage.Rooms.Basement.Root.Colliders,
- --Bathroom
- game.ReplicatedStorage.Rooms.Bathroom.Root.MeshPart_1.Colliders,
- game.ReplicatedStorage.Rooms.Bathroom.Root.MeshPart_2.Colliders,
- --Bedroom
- game.ReplicatedStorage.Rooms.Bedroom.Root.Colliders,
- --Girls Bedroom
- game.ReplicatedStorage.Rooms.Girls_Bedroom.Root.Colliders,
- --Kitchen
- game.ReplicatedStorage.Rooms.Kitchen.Root.MeshPart_1.Colliders,
- game.ReplicatedStorage.Rooms.Kitchen.Root.MeshPart_2.Colliders,
- game.ReplicatedStorage.Rooms.Kitchen.Root.MeshPart_3.Colliders,
- --Living Room
- game.ReplicatedStorage.Rooms.Living_Room.Root.MeshPart_1.Colliders,
- game.ReplicatedStorage.Rooms.Living_Room.Root.MeshPart_2.Colliders,
- game.ReplicatedStorage.Rooms.Living_Room.Root.MeshPart_3.Colliders,
- }
- local TAG_COLLIDERS = "Colliders"
- local collectionService = game:GetService("CollectionService")
- local function SetTagForChildren(object, parentToo)
- if parentToo then
- if object:IsA("Part") and object.Transparency > 0.96 then
- collectionService:AddTag(object, TAG_COLLIDERS)
- --print("Tagged: " .. object:GetFullName())
- end
- end
- for index, obj in ipairs(object:GetChildren()) do
- SetTagForChildren(obj, true)
- end
- end
- module.SetCollidersTags = function()
- for index, obj in ipairs(collidersParent) do
- SetTagForChildren(obj, false)
- end
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement