#why wait not work

1 messages · Page 1 of 1 (latest)

opal knoll
#

My problem is that when I run this piece of code, the console prints doing2, doing3, doing4, and then loops, so clearly the task.wait is the problem, but what do I put instead (a normal wait seems to cause the same problem)?

cold otter
#

There shouldn't be any issues based on the block shown here. Are you sure it's actually looping?

#

@opal knoll

opal knoll
#

lemme see

#

yup
but i just realized that the wait is actually skipped...

cold otter
#

It looks like it's waiting for about a second before it goes to "doing5"

#

Doesn't look like the wait was skipped

opal knoll
cold otter
#

Could you send the entire script?

opal knoll
opal knoll
#

anyways, tell me what you can, i gotta leave

cold otter
#

Hmm.. the only thing I can think of is that the MainEvent remote is being called repeatedly and causing unpredictable behavior

#

Try making a debounce for it so that, if a scenario is already playing, it can't play another one temporarily

uncut yoke
#

How wait cant be working

hollow islandBOT
#

studio** You are now Level 13! **studio

uncut yoke
#

The only issue that i can see is OnClientEvent spam so it looks like that task.wait not working

true lynx
# opal knoll

MainEvent is being called repeatedly, you can fix this by adding a debounce

#

create a global variable debounce = false

#

then put if debounce == true then return end debounce = true

true lynx
#

do you know what debounce is