while wait() do local player = game.Players.LocalPlayer script.Parent.Text = "Strength:" ..player:WaitForChild("leaderstats"):FindFirstChild("Strength").Value end This is in a local script and local script in a text label I am trying to put the leaderstats in a gui for my simulator game but its not working its giving me the error:Infinite yield possible on 'Players.Player1:WaitForChild("leaderstats")' please help
Its just saying that there can be infinive things that can have the name u wait for
First of all, you are constantly defining the local player which can cause performance issues and you are also using an unnecessary loop, try this: JasiuJasiuB is wrong by the way, an infinite yield means an infinite wait not infinite items.
local player = game.Players.LocalPlayer local stat = player:WaitForChild('leaderstats'):WaitForChild('Strength') stat.Changed:Connect(function() script.Parent.Text = "Strength:"..stat.Value end)