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

Do actions of local scripts only show for that specific player?

Hello. I need help with Local Scripts. If a block is CanCollide = true and I use a local script to make it CanCollide = false, does it only work for the specific player?

Code:

local Block = game.Workspace.TestBlock
local Click = Block.ClickDetector
Click.MouseClick:Connect(function(plrclick)
if plrclick.Name == game.Players.LocalPlayer.Name then
Block.CanCollide = false
wait(10)
Block.CanCollide = true
end
end

2 comments

0

Assuming FE, then yeah. Only that player will be able to see that change.

0

MouseClick is server side only... ?

1 answer

✓ Accepted answer

If your game is FilteringEnabled, then yes, if not then no.

FilteringEnabled prevents the client from making any arbitrary action they like on the server. Any action done on the client will not replicate to the server.

However, some stuff are allowed to be replicated to the server from the client, such as: clothing, physics, and animations

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