My script is located in starter character and it is supposed to make the colors of the completed stage checkpoints change if the player has completed them
local stages = game.Workspace:WaitForChild("Checkpoints")
local player = game.Players.LocalPlayer
local Stage = player.leaderstats:FindFirstChild("Stage")
for i,stage in pairs(stages:GetChildren()) do
if tonumber(stage.Name) <= Stage.Value then
stage.Color = Color3.fromRGB(0,170,0)
end
end
Are you getting any errors when you run the script? It could be because stage is spelt with a capital S. Variables are case-sensitive, so it matters if you use capital letters or not.