|
| 31 Jan 2016 04:32 PM |
Basically im trying to play a certain sound everytime someone levels up
game.Players.PlayerAdded:connect(function(plr) local sound = Instance.new("Sound") sound.SoundId = "http://www.roblox.com/Level-Up-item?id=136516845" local stats = Instance.new('IntValue', plr) stats.Name= 'leaderstats' local EXP = Instance.new('IntValue', stats) EXP.Name = 'EXP' EXP.Value = 0 local level = Instance.new('IntValue', stats) level.Name = 'Level' level.Value = 1 local Gold = Instance.new('IntValue', stats) Gold.Name = 'Gold' Gold.Value = 0 EXP.Changed:connect(function() if EXP.Value >= (200*level.Value + level.Value * 150 + 100) then level.Value = level.Value + 1 EXP.Value = 0 sound:Play() end end) end) |
|
|
| Report Abuse |
|