I made a script that makes it so you can walk for 30 seconds when a dev product is purchased. (It just sets the walk speed to 16 then wait(30) then sets it back to 0) I want the timer to be displayed overhead of the player so they can see their remaining time. How can I do this?
Use a for loop from 30 to 0 with a step of -1, on each iteration wait one second. Use the variable (i) as it will tell you which iteration the timer is currently on.
local label = someTextLabel -- ... -- then when the player buys the product, humanoid.WalkSpeed = 16 -- set the walk speed for i = 30,0,-1 do -- i will be equal to a number between 30 and 0 inclusively label.Text = i task.wait(1) end humanoid.WalkSpeed = 0 -- remove the walk speed