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 3 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

local function setInvis(character, value)
    if character then
        for i, v in pairs(character:GetDescendants()) do
            if v:IsA("Part") or v:IsA("Decal") or v:IsA("MeshPart") then
                v.Transparency = value
            end
        end
    end
end

Answer this question