Local scripts can’t run in workspace they have to be in either StarterCharacterScripts, StarterPlayerScripts, ReplicatedFirst
4 Likes
Don’t use a localscript, they don’t work for 99% of cases in the workspace. Use a script with the run context set to local.
oh my god i just got a scripting blindness, this is the most logical answer that i have missed lmao thank you for the help ,
wont that make it a local script?
No, they’re different. Ones a localscript, with the classname “localscript”, ones a script that runs locally.
2 Likes
Or use a remoteevent, and fire it with the serverscript.
EXAMPLE:
this is serverscript
script.Parent.ProximityPrompt.Trigged:Connect(function())
game.ReplicatedStorage.RemoteEvent:FireClient()
end
and this is localscript (shove it anywhere besides workspace)
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function)
-- action here
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.