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

Why isnt my non-cancollide player script working?

Asked by 8 years ago
Edited 8 years ago

This is in a local script and the game is filtering enabled, the script is inside startergui. It doesn't work at all.

local localPlayer = game.Players.LocalPlayer

game["Run Service"].RenderStepped:connect(function()
    for _, player in pairs(game.Players:GetPlayers()) do
        local character = player.Character
        if character and localPlayer.Character ~= character and character:FindFirstChild('Torso') then
            character.Torso.CanCollide = false
            character.Head.CanCollide = false
        end
    end
end)

1 answer

Log in to vote
0
Answered by
skyab12 25
8 years ago

Some local scripts fail with filtering enabled on, you will have to adjust your script with an event.

Ad

Answer this question