Leaderboard: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>DarkWolfXV
New page: <pre> function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local c = Instance.new("IntValue") c.Name = "Money" c.Value = 0 c.Parent...
>Mindraker
Thanks for posting the full script
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre>
#redirect [[Leaderboards]]
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
 
local c = Instance.new("IntValue")
c.Name = "Money"
c.Value = 0
 
c.Parent = stats
 
stats.Parent = newPlayer
 
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
 
game.Players.ChildAdded:connect(onPlayerEntered)
<pre/>

Latest revision as of 02:48, 7 January 2009

Redirect to: