Posted
I need to teleport a character to different points in a loop with a small delay before each next teleportation. How to implement this delay?
Cancel
Post
Replied
task.wait or use coroutines to resume threads on demand
edit: yield not resume
Cancel
Post
Replied
Either wait or task.wait but task.wait is usually prefered for better practises.
Cancel
Post
Owner @Pluto - The Best Executor, External and Script Hub
Download Here! - https://pluto.ad
Replied
local player = game:GetService("Players").LocalPlayer
player.Character:MoveTo(Vector3.new(-95, 150, 0))
task.wait(0.5)
player.Character:MoveTo(Vector3.new(-100, 150, 65))
Use task.wait() instead of wait() for better performance and accuracy.
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Comments
sen0 0 Reputation
Commented
It turned out as I expected, thank you!
0