#Remote event not being received on client

27 messages · Page 1 of 1 (latest)

harsh jungle
#

So Im firing stoneClient Remote event from a module script in replicated storage, this modules function is being ran on a server script in ServerScriptStorage. It should be recieved on the client but for some reason it isnt.


print("firing event from server") -- prints

stoneClient:FireAllClients(partsToSend) --valid table
print("stone event sent") --prints

Server script ^


stoneClient.OnClientEvent:Connect(function(partData) 
    print("sync") -- never prints
end)```
#

Client script ^

inner elbow
#

tried adding a wait? maybe player just isn't loaded yet

harsh jungle
#

I added that and nothing changed but the server is also sending it once I perform a certain task which takes me about 10 seconds

#

well i just did the basics on a new client script and this time it recieved it

#

event.OnClientEvent:Connect(function()
    print("recieved")
end)```
#

yeah i got it to work by redoing it in another client script. im not sure what changed but okay i guess

azure wasp
harsh jungle
#

yes it fires when i perform a certain action in game no matter how long i waited it wouldnt work, but i fixed it by rewriting the client script

azure wasp
#

Alright

#

Mb I didn't see the other chats

harsh jungle
#

i dont know why it fixed it

rough fiber
#

im guessing that by the time the server ran the event, the client was still waiting for the event to be loaded

#

in the new one you don't seem to wait for the events folder

#

maybe that's what making the difference?

harsh jungle
#

i got it t work

#

ohj

#

idk

rough fiber
harsh jungle
#

the new one isnt waitforchild events either

rough fiber
#

still important to know why something works

hollow reef
#

@harsh jungle the module script isn't being loaded

#

or it is?

harsh jungle
#

yes it is

#

or else it wouldnt print

hollow reef
#

a client script or server script is who load the module script?