I have used BindableEvents a million times, but I have no idea why this isn’t firing. I feel like it’s a really simple, dumb mistake, but I cannot for the life of me spot it.
Events.HandlerBindable.Event:Connect(function(func)
print("Fired Server")
if not func then return end
if func == "Initialize" then
script.Parent.Enabled = true
tweenOut:Pause()
tweenIn:Play()
end
end)
I just want to clarify something; are you attempting to transfer data between a client and the server? If so, you might want to try using a RemoteEvent in this case.
I can’t seem to find anything wrong with the code provided. Did you want to provide a similar snippet of code for another menu that works? I also take it that it prints “Client Fired” but nothing from the other script?
Events.HandlerBindable.Event:Connect(function(func)
if not func then return end
if func == "Initialize" then
---etc, this is a longer function but same setup.
And correct in regards to the print functions. I get “Client Fired” but not the other part.
What type are the scripts? You might be firing or receiving it from the RoleplayMenuServer script, which will only do so server-sided.
Also why would you put a server script inside PlayerGui (just wondering)
As people have mentioned above, the Script receiving the signal is a server script. Bindable Events require client to client communication, and you have a Client to server communication. If you wish to change this Use a remote event. If you want a client to client connection, change the script that is getting the signal into a local script.
I have a server script in the UI mainly just to handle server-sided requests that I cannot handle in client scripts, or changing various variables (such as, in this case, a GUI above the player’s head).
I know there are other ways to do this. I prefer keeping things orderly and grouped up like this.
Except it doesn’t, because that is not what it is designed for, and it is not where the function I have mentioned above is located. As I have already specified in an earlier reply, i am sending from one script on the client, to another script on the client.
“RoleplayerMenuServer” is a server script. Where is the 2 scripts your calling and recieving the signal from if there is only one valid local script in the picture in the orginal post? Thats just where I am confused
Where is script A (one not pictured) located in (it’s parent)? And while I’m asking these questions, What has it printed so far as your scripts do have prints?
Is there any code in either of the scripts above where you’re connecting functions to the events that yields forever, like while loops? If so, you can use task.spawn() to run them without yielding the rest of your code.
If you’re having trouble finding where it could be yielding, you can set a a break point at the top of your script, and use the debugger to go line by line until you find the issue.
To create a break point, click to the right of the line number: