For some reason the text is not changing even though it is parented to the correct object.
Output:
Infinite yield possible on ‘Players.SilentSuprion:WaitForChild(“LeaderStatsScript”)’ - Studio
Script:
local Player = game.Players.LocalPlayer
local Leaderstats = Player:WaitForChild(“LeaderStatsScript”)
You should have a script exactly named LeaderStatsScript inside the Player Object, if it can’t find it then it’ll result as an “infinite yield possible” warning cause it’s still searching for it
local Player = game.Players.LocalPlayer
local Leaderstats = Player:WaitForChild("leaderstats")
local Exp = Leaderstats:WaitForChild("Exp")
while wait() do
script.Parent.Text = "Exp " .. Exp.Value
end
Then you have to reference your Leaderstats variable as leaderstats, don’t try and change the name it, otherwise you’ll get that warning
local Player = game.Players.LocalPlayer
local Leaderstats = Player:WaitForChild("leaderstats")
local Exp = Leaderstats:WaitForChild("Exp")
Exp.Changed:Connect(function(NewValue)
script.Parent.Text = "Exp "..NewValue
end)