Well, im trying to do an rpg game and in the leaderboard are three values: Power, Money and Magic. And every magic number is an element. Like 1 is fire, 2 is water, 3 is earth etc. . And here is the script that i was using, but it doesnt work! Im trying to do like:
if script.Parent.Parent.leaderstats.Magic.Value == 1 and script.Parent:findFirstChild("Fire") == nil then game.Lighting.Fire:clone().Parent = script.Parent end
But it doesnt work! Help!
game.Players.PlayerAdded:connect(function(plr) -- player added local stats = Instance.new('IntValue',plr) stats.Name = 'leaderstats' local magic= Instance.new('StringValue',stats) magic.Name = "Magic" magic.Value = "Earth" end)
this leaderbord should work .
http://wiki.roblox.com/index.php?title=Leaderboard
this article will also help you under stand leaderbords a little bit to.