I have a script on the client for a moveset system. I have a variable called active that is a universal cooldown of sorts so you can’t use two moves at the same time. I have a remote event for the move. Something like this:
local active = false
button.ImagineISetUpCAS:Connect(function())
if not active then
active = true
game.ReplicatedStorage.RemoteEvent:FireServer()
active = false
end)
end
I want active to only be set to false again after the move is finished, so after everything in the remote event function is done running. Basically, I want the local script (like this example) to yield to the remote event.
Is there a way to do this? Do I have to use remote functions and just return nothing?