#the bindable function doesn't yield the code
1 messages · Page 1 of 1 (latest)
i want the first script to yield in the line local ItemsDeleted = RemoveItem:Invoke(ExitFrame) until it returns a table from the second script (both are module scripts required by a local script btw)
You could try putting
while itemsdeleted == nil do
Task.wait()
End
Since the client will send back an empty table if they dont delete anything when they are finished, the while statement won't block the code from continuing
Put this after the invoke
sure i will try
it didn't work although what you said makes sense
Did it still print out nil?
it didnt print anything
Try doing
Local itemsdeleted = nil
Itemsdeleted = invoke
** You are now Level 5! **
it printed nil still
Even with the loop huh that's weird
ye with the loop it doesnt print anything
i think that the return doesnt even reach the first script
Yea i just saw it now
I think your server side invoke is supposed to be invokeclient
I don't see anything on just invoke
i am using a bindable function which means that it allows 2 local scripts to interact with each other
so the :invoke() is correct
Ah wait it might be because it needs an oninvokd
RemoveItem is the bindable function right?
yes
So on the other script you need to have
RemoveItem.onInvoke = removebuild
i have it here
Welp if you already have that then
Guess let's check if the removebuild function is actually being called
I'm thinking it's running the removebuild function and once it sets up the connections, it doesn't wait and just sends back nil
So maybe have a while statement at the end of removebuild
i think thats the case
sure