How can i fire remote events from serverstorage(modulescript) to a serverscriptservice.
for example i have a table whit one Value. And now I want something to be printed if the value is true.
So i write something in a Server script.But I’ve been told that I can’t just say if serverstorage.Module…Value == true … so how can i do this whit a remoteevent
Remote events need to be replicated. ServerScriptService and ServerStorage are not replicated. Like @JackscarIitt said, use bindable events or binadable functions for this.
1 Like
References btw, both Services are handled on the server-side so there’s no way that you are able to obtain the client at all even with a ModuleScript
, maybe if you put it inside ServerScriptService
it could work but still
I’m pretty sure you can’t fire remote events from serverstorage. What you can do instead is:
--Running the remote event from a localscript
local boolValue = --Your bool value
local RemoteEvent = --Your remote event
local function checkIfTrue()
if boolValue.Value == true then
RemoteEvent:FireAllClients() --Put whatever you want to fire
end
end
boolValue1.GetPropertyChangedSignal:Connect(checkIfTrue)
You get my point, you will not run it through scripts. But in RemoteFunctions this can be something I guess.