yeah because they are the same one,
but that script is another one so u have to use OnserevrInvoke or On clientInvoke depedning on the situation
yeah because they are the same one,
but that script is another one so u have to use OnserevrInvoke or On clientInvoke depedning on the situation
What are you talking about? they are not even a valid event. It is a bindable function.
are you sure you are a scripter?..
My bad your one is bindable and bindable can only go from server to server script
it cannot pass through client for bindable events I suggest uito use a remote function
Sorry,I was being carried with my game
oh my god… Bindable event/function are from the same side. So server → Server or Client → Client. Remote function are Client → Server or Server → Client.
So is the solution resolve??? I hope it is resolved
That happens to me a lot of times,I have to literally scrape off the thing
My brain is actually imploded
Because I have exams later on
I’m not sure if you’ve solved it already in the midst of the argument but :Invoke() will yield until the callback is registered and returns on the invoking call. In the case of the invocation being in a protected call, an error will still be thrown in the callback but the invoking thread will resume execution as you’d expect.
I checked the thing from BindableFunction | Documentation - Roblox Creator Hub and it may seem like that BindableFunction.OnInvoke
may be stuck in a loop, try checking the code for it, also I see no reason at all to wrap :Invoke in a pcall function to begin with.
Edit:
I realized it says “if the callback was never set, the script that invokes it will not resume execution.”
I think I found the problem. The problem is inside this line of code:
local plr, char = players.LocalPlayer, players.LocalPlayer.Character and players.LocalPlayer.CharacterAdded:Wait()
I had accidentally implemented the “and” operator instead of “or”, consequently returning nil the character. Therefore, if the character is false, the characteradded:Wait() would never be evaluated as true, resulting in nil, and not running the code. That’s why when I tried to call the bindablefunction when it was invoked on the same script, it was invoking, differently from the other one, since the script was not running, and would never invoke as a result.
Thanks!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.