Hello, I want to make a clicker game but I have a problem. I want to make a text like to show your currency.
Here's my script.
game.Players.PlayerAdded:Connect(function(plr) local dp = plr.leaderstats.DP.Value while true do wait(0.5) script.Parent.Text = "Dino Points: "..dp end end)
When I click "Play" nothing happens.The text isn't changing.Can someone help me? The game is FE
We had a lot of conversation, so you've told me that script wasn't working in the client (game). So I will try to do my best.
-- Make sure that this is a Local Script local Player = game:GetService("Players").LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local Currency = leaderstats:WaitForChild("DP") while wait() do script.Parent.Text = "Dino Points: "..dp.Value end -- ^ Hopeful, this will fix your question ^
Try this:
game.Players.PlayerAdded:Connect(function(plr) local dp = plr.leaderstats.DP dp.Changed:Connect(function() script.Parent.Text = "Dino Points: "..dp end) end)