I have a script for a timer that counts it down but when it ends I want it to change the values? How would I do that?
1 | while true do |
2 | wait() |
3 | script.Parent.Text = script.Parent.Time.Value |
4 | end |
The two values are StartTime and EndTime.
1 | if script.Parent.Time.Value = = 0 then |
2 | --Do stuff when the timer ends |
3 | end |
This would detect when the "Time" Value becomes 0 and executes whatever code you need.
Full Code:
1 | while true do |
2 | wait() |
3 | script.Parent.Text = script.Parent.Time.Value |
4 | if script.Parent.Time.Value = = 0 then |
5 | --Do stuff when the timer ends |
6 | end |
7 | end |