Simple Stats GUI Not Working

So, I created this simple Stats GUI and for some reason, it doesn’t even show my gems.

It should because it’s such a simple script.

-- // Variables
local PlayerService = game:GetService("Players")
local Stats = script.Parent.Stats

-- // Properties

-- // Main Code
while wait() do
	Stats.Money.Text = "Money: "..PlayerService.LocalPlayer.Stats.Money.Value
end

while wait() do
	Stats.Gems.Text = "Gems: "..PlayerService.LocalPlayer.Stats.Money.Value
end

I’m not even sure why this happens!

image

image

1 Like

Fixed: I did the dumbest thing. I did 2 while wait() do’s when I could just put them both in the same one.

Why do you need a loop for this simple thing, whereas you could just use .Changed event for that Values? It isn’t really good for performance.

– // Variables
local PlayerService = game:GetService(“Players”)
local Stats = script.Parent.Stats

– // Properties

– // Main Code
while wait() do
Stats.Money.Text = "Money: "…PlayerService.LocalPlayer.Stats.Money.Value
Stats.Gems.Text = "Gems: "…PlayerService.LocalPlayer.Stats.Gems.Value
end

1 Like

Thanks but I already fixed it.