Run LocalScripts inside a ServerScript

This is general question. Of course server to client and client to server side is achieved by remote events. However, for simple things such as playing an audio or changing lighting, a RE doesn’t seem practical. Is there a way to pass local script code through an event where I can control small client things without creating a new RE for each function?

An example of this:

game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("RunLocal"):FireClient(plr,function()
	game:GetService("Lighting"):WaitForChild("Atmosphere").Density = 0.75
end)

No. You need to utilize RemoteEvents.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.