local Player = game.Players.LocalPlayer local leaderstats = Player.leaderstats local coins = leaderstats.Coins local gems = leaderstats.Gems local Level = leaderstats.Level local coinsgui = script.Parent.Coins local LevelGUI = script.Parent.Level local gemsGUI = script.Parent.Gems while true do coinsgui.Text = "Coins - "..coins.. "" LevelGUI.Text = "Level - "..Level.. "" gemsGUI.Text = "Gems - "..gems.. "" wait() end
local Player = game.Players.LocalPlayer local leaderstats = Player.leaderstats local coins = leaderstats.Coins local gems = leaderstats.Gems local Level = leaderstats.Level local coinsgui = script.Parent.Coins local LevelGUI = script.Parent.Level local gemsGUI = script.Parent.Gems while true do coinsgui.Text = "Coins - "..coins.Value.. "" LevelGUI.Text = "Level - "..Level.Value.. "" gemsGUI.Text = "Gems - "..gems.Value.. "" wait() end
you forgot to put .Value after the stats name, else it tries to name it an instance.
while true do coinsgui.Text = "Coins - " .. coins.Value LevelGUI.Text = "Level - " ..Level.Value gemGUI.Text = "Gems - " ..gems.Value end
What's missing is that you needed to get the value of the leaderstat by using the Value
property.
local Player = game.Players.LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local coins = leaderstats:WaitForChild("Coins") local gems = leaderstats:WaitForChild("Gems") local Level = leaderstats:WaitForChild("Level") local coinsgui = script.Parent.Coins local LevelGUI = script.Parent.Level local gemsGUI = script.Parent.Gems while wait() do --while wait() do, I don't recommend while true do. coinsgui.Text = "Coins - "..coins.Value --You needed to add Value, because how else are you supposed to get how much coins the player has? LevelGUI.Text = "Level - "..Level.Value gemsGUI.Text = "Gems - "..gems.Value end
Please accept my answer if this helped you!