How do I make this script client sided when they touch a brick

Aight so Im trying to make it so that when a brick touches another brick it will show a gui everytime they passed by because Im using it for a slot game

Basically an indicator when to turn.
eg.

but people can see it too even though its a local script

pls help

I might be late to reply since I would be sleeping after this.

Client-to-server interaction is done with RemoteEvents/RemoteFunctions.
In your case, have your LocalScript to fire a RemoteEvent that will change the brick’s appearance.

2 Likes

There’s no touch verification I presume, I recommend reading up on this

But in short, you should have it so when you touch something that’s on a localscript, verify who touched it using a few if statements. Such as

if player.Character and hit:IsDescendantOf(player.Character) then

Where player is the name of your localplayer varaible and hit is the thing that touched the part you’re checking

Although not sure how it would with your thing, you may need to tweak it around or use a RemoteEvent

1 Like

Use :FireClient() from a remote event fired when the part touches the other part. In a local script, you can then make the GUI visible with the :OnClientEvent() remote.