For halloween I am making a candy scavenger hunt update. When you touch a candy it is supposed to delete itself on your screen but nobody else’s and the GUI is supposed to pop up neither is working though. Here are my scripts
This script is in ServerScriptStorage
Then I have a remoteEvent in replicated storage
I also have a script in the GUI (which is in starterGUIS)
Wait. Is it Local? That means that it will only show up for the Local Player / the Client.
If yes, then I’m not sure. If no, then just put the Code into a LocalScript!
Good luck with your Halloween Update!
You should make a localscript (in the candy part/model) where it for instance when touched, it’ll go transparent, non-collidable, and any other actions, which could apply for the GUI for instance.
okay so I added something into the first script that made it so when it touched it would print test but it isn’t printing so something must be off about that
I have the candies all stored in a folder in workspace
then in ServerScriptStorage I have a normal script to detect if touched
which fires the FoundCandy remote event (which is in rep storage)
that then triggers the local script inside of the guI
No, it should not. Firing clients must be done on the server. To be honest, you can just do the entire script in 1 local script if you only want it to display that they found the candy.
Keep in mind localscripts do not run in workspace. They only run when they are descendant of the player, in a tool, or in the players character, or replicatedFirst.