i’m trying to make a part fire a remote event when touched by a part named “tax”, but nothing happens. no errors, just… nothing. here is the local script:
local remote = game:GetService("ReplicatedStorage").Remotes.GiveCurrency
if hit.Name == "tax" then
if you know what is causing this, or need more information, please reply!
If this is located inside of a part, this script won’t execute. LocalScripts can only run in client services (like StarterGui or StarterPlayerScripts, for example) With the exception of the player’s own character model.
You could put your script in StarterCharacterScripts, and then define a reference to the part you want the player to be able to touch.
comment above is right
but heres an unrelated question
I see that you’re calling a remote from the client to the server
do you have any checks to ensure that exploiters cannot manipulate that remote to give themselves money?
Sorry for the late reply, I didn’t realize I couldn’t execute it from a part for some odd reason. Thanks a lot for your help!