Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I make players uncollidable with each other?

Asked by 4 years ago

I want to make all people who are not on the player's team invisible and able to be walked through. I made a function to set the other teams' characters to invisible, but it is not working to set CanCollide to false. Am I doing something wrong?

this is the code for my function

1local function setInvis(character, value)
2    if character then
3        for i, v in pairs(character:GetDescendants()) do
4            if v:IsA("Part") or v:IsA("Decal") or v:IsA("MeshPart") then
5                v.Transparency = value
6            end
7        end
8    end
9end

Answer this question