How do i make a stats gui? for a fighting game that i can put points into it Not Leadersboard Custom stats gui
COMMUNITY QUESTION
How do i make a Stats Gui? More info in desc
1 answer
I'm assuming you want a GUI that shows your leaderstats. Put a LocalScript in your TextLabel with the following:
local prefix = "Cash: " --Your prefix, could be something like CASH, MONEY, KILLS, etc.
local leaderstats = game.Players.LocalPlayer.leaderstats --Assuming you have leaderstats set up
local stat = leaderstats.STATNAME
stat.Changed:Connect(function()
script.Parent.Text = prefix .. stat.Value --This code will run every time the stat changes
end)
If you don't have leaderstats set up, then that's really simple to do. Put this in a Server Script inside ServerScriptService:
game.Players.PlayerAdded:Connect(function(plr)
local leaderatats = Instance.new("Model",plr)
leaderstats.Name = "leaderstats"
local stat = Instance.new("IntValue",leaderstats)
stat.Name = "Money" --Change if you want
--Add more variables as you please
end)
Hope I helped! If you have questions, post a comment below.
5 comments
0
Just reading this isn't what you want. Maybe be more descriptive next time.
0
How do i make it function with the gui?
0
if possible i really need your help if you know how
0
it does. it sets the GUI text to the leaderstats value.
0
I don't use leaderstats i need to make a custom one
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
do you mean the default leaderstats made by Roblox?
No