Hello everyone! I would like to make a brick so when you touch it, it will run a script on your client only. How would I do this?
I've created this simple script that will execute something when it's touched, but on the server. How do I make it run ONLY on your client
function onTouched()
--stuff here
end
script.Parent.Touched:connect(onTouched)
Thank you.

8 comments
Do you know how to use localscipts?
ive tried that.... it doesn't work
Do you have Filtering Enabled?
yes..
oh i know
when the player touches WHICH brick?
https://prnt.sc/tokgpn - I have two bricks in the server. The red one is supposed to destroy the white one ONLY ON YOUR CLIENT. it works with regular scripts, but executes on the server.
Make the script a local script and copy and paste the code. Then change script.Parent.Touched to something that points to the block like workspace.part.Touched. That way it all runs in a local script, and therefore the client