Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a script that changes values?

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?

while true do
	wait()
	script.Parent.Text = script.Parent.Time.Value
end

The two values are StartTime and EndTime.

1 answer

if script.Parent.Time.Value==0 then
	--Do stuff when the timer ends
end

This would detect when the "Time" Value becomes 0 and executes whatever code you need.

Full Code:

while true do
    wait()
    script.Parent.Text = script.Parent.Time.Value
	if script.Parent.Time.Value==0 then
		--Do stuff when the timer ends
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.