I have a script that fires an event, but I want that script to wait until a different event is fired. These are bindable events btw. I've tried wait(EventName.Event), repeat until EventName.Event, EventName.Event:Wait(). None of these are working. The other script is firing the event however, if I remove the Fire() from the other script the main script still doesn't wait for the event to be fired. If anyone has any ideas please let me know.
detect remote fired documentation:
local check_if_fired = 0 -- if fired then it should change check_if_fired to 1 --[[ if the different event is fired, try to detect it when it fires like this: local differentevent = --the path of the different event (on client) differentevent .OnClientEvent:Connect(function() check_if_fired = 1 end) (on server) differentevent .OnServerEvent:Connect(function() check_if_fired = 1 end) ]] if check_if_fired == 1 then --the code here ( the line of code that you fire the remote) end
hope this helped you