time2 is in that frame, idk why its saying its not when it is ;/
function Change() local seconds = script.Parent.Parent.Time script.Parent.Parent.time2 = seconds.Value < error happens here for i = 1,seconds.Value do wait(1) seconds.Value = seconds.Value - 1 script.Parent.Parent.time2 = seconds.Value end end script.Parent.MouseButton1Click:Connect(Change)
Look at line 5;
script.Parent.Parent.time2 = seconds.Value
You didn't set the text of the time2
text button!
Change that line to:
script.Parent.Parent.time2.Text = seconds.Value
Fixed the problem for me. You made the same mistake on line 10, and, off topic, please indent your code properly next time.
i dont know if thats correct, but try doing this:
function Change() local seconds = script.Parent.Parent.Time script.Parent.Parent:WaitForChild("time2") = seconds.Value for i = 1,seconds.Value do wait(1) seconds.Value = seconds.Value - 1 script.Parent.Parent.time2 = seconds.Value end end script.Parent.MouseButton1Click:Connect(Change)
if not, then this:
function Change() local seconds = script.Parent.Parent.Time script.Parent.Parent:FindFirstChild("time2") = seconds.Value for i = 1,seconds.Value do wait(1) seconds.Value = seconds.Value - 1 script.Parent.Parent.time2 = seconds.Value end end script.Parent.MouseButton1Click:Connect(Change)
if it stilll doesnt work, please send me a screenshot of your startergui.