Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why will my script not respond to an event when other scripts do?

Asked by 8 years ago

In my workspace i have a folder called Events and in it i have a BindableEvent called CreateWorld.

I fire it in a local script and other scripts catch onto this event but this script ("A server script") wont notice the event.

workspace.Events.CreateWorld.Event:connect(function()
    print("GotEvent")
    GenerateMap()
    CreateMap()
end)

May i note that when i manually fire it in the debugger it works for this script. Also this script dose not have to wait for variables before it listens to the event, I checked.

0
Use a RemoteEvent instead of a BindableEvent. GoldenPhysics 474 — 8y
0
Remote events fire across server to cliant and back but i need the event to be seen by both server and client scripts an be fired by any server or client scripts. SciGuy2002 15 — 8y
0
I should also note that it works in studio and not in online mode. SciGuy2002 15 — 8y
0
Why do you need both sides to use it at the same time? GoldenPhysics 474 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Taken straight from the wiki: "please note that BindableEvents do not allows for communication between the server and client." Maybe you can make both a BindableEvent, and RemoteEvent, and use the RemoteEvent in your local script?

Ad

Answer this question