How to make something happen for 1 player

How would I make it so that if a player touches something then they can’t touch it anymore and its invisible for just them no one else unless they touch it as well?

You can just make the part invisible for them on the client, so that way it won’t replicate to other players.

1 Like

So would I just use a local script? I don’t really get the difference between a script and a local script.

2 Likes

Yeah, you’d just use a local script unless there’s something important related to the player in it, like money or something, to where you’d have to use some RemoteEvents and understand the Client → Server Model. However, the difference between scripts and local scripts is simply that local ones are replicated to all clients, and have access to the player.

1 Like

To add to this, when using RemoteEvents/Functions to for example give a player cash, it’s important to manage and check the request on the server(Script) else exploiters will able to abuse the remote to earn infinity amounts of cash(for example if the amount of money a player should get passes to the server as a parameter).

1 Like

Is a module script client sided?

A module script can either be client sided or server sided, it purely depends on the script requiring it(for example if a LocalScript requires a ModuleScript the code will run on the client).

1 Like