Task.delay() not working

Hello.
I tried using task.delay() to delay for 0.5 seconds and then print a message and enable a proximity prompt.
But nothing was printed, and might as well proximity prompt stays disabled.
Did I make anything wrong or misunderstood?

Here is my script

	task.delay(0.5,function()
		print("0.5 second elapsed.")
		Model.Handle.ProximityPrompt.Enabled=true		
end)

Thanks in advance!
Sorry for bad English though.

1 Like

Use task.wait() instead of task.delay()

2 Likes

Iā€™m sorry, I just realized the next line of the script is an unequipping item.
So it is virtually destroying the script.
So no wonder why that task.delay() died.

Very sorry!

1 Like