My tool is not working at all

I’m at a loss, I don’t see anything notably wrong with the code. Mind providing me a video or something so I can see how it behaves?

1 Like

when i activate the tool, nothing happens at all just like we dint put any script at all

me too very confused

WAIT, I FOUND THE PROBLEM! task.wait() is not allowing the touch code to execute.

3 Likes

OH UR RIGHT

WHAT IS THE DIFFRENCE BETWEEN TASK.WAIT AND WAIT.
what is the diffrence beetween them?

task.wait is more efficient and precise than wait()

And to fix your problem you can either just remove the task.wait() entirely or put it inside a coroutine.

Wait kind of makes it delay more than you put
but task.wait() makes the delay much more less

what do you mean i dont udnerstnad

I know that, it’s why I used it.
And my fix was wrapping it in a coroutine.

2 Likes

Updated the code again, should hopefully work.

1 Like

Eg.

If you do:

wait(1)

It would take a few more milliseconds than just 1 therefore creating extra unnecessary wait time.

as to

task.wait(1)

Would have even less extra milliseconds therefore lessening the unnecessary wait time.

Test Thing.rbxl (35.3 KB)
This post is way to long for something this simple, so here is a file that works

why did they say that the code does not run if it is task wait? it is just a shorter wait

It still wouldn’t run even with wait()

It’s because it’s pausing execution and not allowing my touched function to work, same would happen with wait().

1 Like

Anyways, replying to this so people can access this quickly if they haven’t done so already.

1 Like

but i want it to stop working after 10 seconds, and also when activated it rotates it (-90, 0 ,0)

Can do, hold on a second while I update it.

1 Like

Done, added the orientation change.