while true do wait(0.05) while true do if script.Parent.Parent.Control.Value == 0.03 then while true do script.Parent.a.SurfaceGui.TextLabel.Text = "This train Terminus here." script.Parent.b.SurfaceGui.TextLabel.Text = "You can exit this train" wait(5) script.Parent.a.SurfaceGui.TextLabel.Text = "or stay here" script.Parent.b.SurfaceGui.TextLabel.Text = "" wait(5) if script.Parent.Parent.Control.Value == 0.05 then script.Parent.a.SurfaceGui.TextLabel.Text = "Ad.test" script.Parent.b.SurfaceGui.TextLabel.Text = "Ad.test" end end end
l want to change the Value from 0.03 to 0.05,it success but the script keep in Value 0.03 steps
l need a scripts to fix it
Note :the Studio not say anythings
while wait(0.5) do -- waits 0.5 seconds before re looping if script.Parent.Parent.Control.Value == 0.03 then script.Parent.a.Surface Gui.TextLabel.Text = "This train Terminus here." script.Parent.b.SurfaceGui.TextLabel.Text = "You can exit this train" wait(5) script.Parent.a.SurfaceGui.TextLabel.Text = "or stay here" script.Parent.b.SurfaceGui.TextLabel.Text = "" wait(5) script.Parent.Parent.Control.Value = 0.05 -- set controls values elseif script.Parent.Parent.Control.Value == 0.05 then script.Parent.a.SurfaceGui.TextLabel.Text = "Ad.test" script.Parent.b.SurfaceGui.TextLabel.Text = "Ad.test" wait(5) script.Parent.Parent.Control.Value = 0.03 -- set controls value end
One you didn't need all those while true do
Other thing was you put ifs try using elseif
Also it might be easier for you to use variables instead of writing it out each time.
Ex.
a = script.Parent.a.SurfaceGui.TextLabel a.Text = "hi"