Is there any way to run a Script from a LocalScript?

I am aware that you can do it vice versa, however, I am trying to activate a Server Script from a Local Script. The reason for this is due to a story game I am making. Please let me know. Thank you.

1 Like

I’m not sure if I understand exactly what you’re asking

  1. Insert a Remote Event into Replicate Storage named Event

  2. Make a localscript with this code:

local event = game.ReplicatedStorage.Event

--Trigger
event:FireServer(Parameter1, Parameter2)
  1. Make a serverscript with this code:
local event = game.ReplicatedStorage.Event

event.OnServerEvent:Connect(function(Playerinstance, Parameter1, Parameter2)

end)

And that’s how you can get code to run on the server from a LocalScript, be careful though as exploiters can fire these remote events at will

6 Likes