Think it’s better to use Changed instead of a while loop, put a localscript in StarterCharacterScripts with this?
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local playerGui = player:WaitForChild("PlayerGui")
local counter = PlayerGui:WaitForChild("StageCounter").Frame.Counter
local value = character.StageCounter
counter.Text = value.Value
value.Changed:Connect(function(newVal)
counter.Text = tostring(newval)
end)
Get the counter thing from the PlayerGui firstly and then set the text of the counter to be the current value and then when the value updates/changed, the counter changes too, the baiscs of waht is required. Note that I didn’t say to put a localscript in the counter because the character reference will change when the character dies, a localscript like this in StarterCharacterScripts ensures it’ll get the latest reference, plus the value will be destroyed anyways so you’d have to make another connection