Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Best way to display player stats on a GUI?

Asked by 3 years ago
Edited 3 years ago

I want to have the value of the player's gold within a GUI and this is what I have so far:

Local Script within GUI:

local player = script.Parent.Parent.Parent.Parent
local Gold = player.leaderstats.Gold

script.Parent.Text = Gold.Value

Gold.Changed:Connect(function()
    script.Parent.Text = Gold.Value
end)

Is this good practice and will exploiters be able to change their gold value somehow with this? Thank you.

0
This is good practice. just change your player variable to game:GetService("Players").LocalPlayer and you'll probably be fine. exobyteXL 290 — 3y

Answer this question