I have been working on a backpack shop script here is my code: wait(1) while wait() do local Host = script.Parent.Parent.Parent.Parent.Parent.Parent local Player = game.Players:FindFirstChild(Host.Name) local Backpack = Player:WaitForChild("BackpackShop").BackpackV local mining = Player.leaderstats[Player:WaitForChild("BackpackShop").Mining.Value] script.Parent.Parent.Parent.SurfaceGui.TextLabel.Text = mining.Value.."/"..Backpack.Value if script.Parent.Parent.Parent.SurfaceGui.TextLabel.Text == script.Parent.Parent.Parent.CurrentOre.Value.."/"..script.Parent.Parent.Parent.MaxOre.Value then script.Parent.Parent.Parent.BrickColor = BrickColor.new("Really red") else script.Parent.Parent.Parent.BrickColor = BrickColor.new("Grey") end end

2 comments

0

Please use a code block, it's the button with the lua thing above the text thing

0

In your mining variable, change WaitForChild to FindFirstChild