I am making a game and you can unlock a character, but to unlock it you need to break some barriers, but I don't know how to make them break for only that one client but not the others that didn't do it. The code I were thinking of doing before I knew I had to do ClientSided was
1 | local PartsToBreak = game.workspace.SecretCharacterLockedUpPlanks:GetChildren() |
2 | PartsToBreak.ClickDetector.Mouseclick:Connect( function () |
3 | PartsToBreak.anchored = false |
4 | end ) |
I think it is something like that but I need it to be ClientSided instead of ServerSided.
You gotta loop thought all parts like this:
local parts = game.Workspace.Folder:GetChildren()
for i,v in pairs(parts) do v.Anchored = false end
Make sure to put the LocalScript where it can be executed by the client (ex: startergui, starterplayer, etc)