Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why isnt my non-cancollide player script working?

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

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.