Once I run through this script in test mode, there are no errors. The script still does not work though. What am I doing wrong?
local plr = game.Players.LocalPlayer local g = plr:WaitForChild'stats' local timemax = g:WaitForChild('timemax') local countdown = g:WaitForChild('countdown') local loaded = g:WaitForChild('loaded') for i = 1,25 do countdown.Value = countdown.Value +1 script.Parent.Size = UDim2.new(countdown.Value/timemax.Value,0,1,0) wait(1) end if countdown.Value == 60 then loaded.Value = true end
The script is in a LocalScript and It is supposed to add 1 to the countdown value every 1 second, then when the countdown's value is 60, the "loaded" value is true. Which will complete the loading sequence in my game. Thank you for the help!
make sure the names of the objects you get using WaitForChild("") are correct
try adding a print("") after each :WaitForChild("") to make sure you spelled it right
add wait(1) after for i = 1,25 do
for i = 1,25 do wait(1)