Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage while true do script.Parent.Text = "Current stage: " ..Stage.Value.. "/100" wait(0.1) end
Second script
Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage while true do wait() local pie = Stage.Value * 1 / 100 script.Parent.Size = UDim2.new ( pie , 0 , 0 , 45) end
Works:
local Player = game.Players.LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local Stage = leaderstats.Stage while true do script.Parent.Text = "Current stage: " ..Stage.Value.. "/100" wait(0.1) end
Works:
local Player = game.Players.LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local Stage = leaderstats.Stage while true do wait() local pie = Stage.Value * 1 / 100 script.Parent.Size = UDim2.new ( pie , 0 , 0 , 45) end
I don't know what the error was but now it works. I only added this: local Player = game.Players.LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local Stage = leaderstats.Stage