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

GUI points system?

Asked by 8 years ago

So for a GUI there is a text that says the cash and everyone spawns with 0 cash "$0" so for that cash can I make it link to a leaderboard so once you earn a point on the leaderboard it also shows on the gui so you get like 5 points the gui will say "$5" and it updates to the players leaderstat

-- The cash is named "Points"

add.Value  +1
script.Parent.Text = "$"
0
Are you using Int Value? iNicklas 215 — 8y
0
Yes DiamondCookie2 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Do you know how to make a leaderboard? If not, put this script into workspace:

function playeradded(player)
Leader=Instance.new("IntValue")
Leader.Parent=player
Leader.Name="leaderstats"
P=Instance.new("IntValue")
P.Parent=Leader
P.Name="Points"
end
game.Players.PlayerAdded:connect(playeradded)

I'll leave you with an on touch script. Put it into a part.

function T(hit)
player=game.Players:findFirstChild(hit.Parent.Name)
if player~=nil then
player.leaderstats.Points.Value=player.leaderstats.Points.Value+10
end
           end
script.Parent.Touched:connect(T)

Also, for a cash GUI, put this script into a text label that's in a GUI that's in startergui.

while wait() do
script.Parent.Text=script.Parent.Parent.Parent.Parent.leader stats.Points.Value.."$"
end

Hope this helped!

-ds

Ad

Answer this question