Help With coroutine.wrap

I am trying to run a function that has a timer inside. I want it to return right after the function is called, but right now, it is waiting for the function to stop running. This causes an error with developer products, which is what the function is used for. Right now, I am doing this whenever they successfully purchase a developer product.
return Enum.PurchaseDecision.PurchaseGranted
But I am getting these 2 errors.

If anyone knows how to properly use a coroutine wrap function, please reply.

Try changing it to coroutine.wrap(spinWheel)(plr).

Again, it’s working the first time but not after that, but the errors went away.

What do you mean by its only working the first time?

Sorry! I figured it out. It was something in my function. Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.