kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 03 Feb 2012 07:18 PM |
function OnPEnter(newplayer) staty = Instance.new("IntValue") lv1 = Instance.new("IntValue") lv2 = Instance.new("IntValue") --! staty.Name = "Coins" lv1.Name = "Attack" lv2.Name = "Def" staty1.Parent = newplayer lv1.Parent = newplayer lv2.Parent = newplayer --! end game.Players.PlayerAdded:connect(onPEnter)
Why does this not work? Looks clean. |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
| |
|
|
| 03 Feb 2012 08:09 PM |
function OnPEnter(newplayer) staty = Instance.new("IntValue") lv1 = Instance.new("IntValue") lv2 = Instance.new("IntValue") --! staty.Name = "leaderboard" --Make this a leaderboard. lv1.Name = "Attack" lv2.Name = "Def" staty1.Parent = newplayer lv1.Parent = newplayer lv2.Parent = newplayer --! end game.Players.PlayerAdded:connect(onPEnter) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 08:15 PM |
I fixes Luis's script.
function OnPEnter(newplayer) staty = Instance.new("IntValue") lv1 = Instance.new("IntValue") lv2 = Instance.new("IntValue") --! staty.Name = "leaderstats" --Make this a leaderboard. lv1.Name = "Attack" lv2.Name = "Def" staty.Parent = newplayer lv1.Parent = staty lv2.Parent = staty --! end game.Players.PlayerAdded:connect(onPEnter)
† KMXD † |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 03 Feb 2012 08:44 PM |
Coins Attack Def
game.Players.PlayerAdded:connect(function(new) stats = Instance.new("IntValue", new) stats.Name = "leaderstats" -- Instance.new("IntValue", stats).Name = "Coins" Instance.new("IntValue", stats).Name = "Attack" Instance.new("IntValue", stats).Name = "Def" end) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 09:32 PM |
game.Players.PlayerAdded:connect(function(newPlayer)
stats = Instance.new("IntValue", newPlayer) stats.Name = "leaderstats"
p = Instance.new("IntValue", stats) p.Name = "Coins"
g = Instance.new("IntValue", stats) g.Name = "Attack"
f = Instance.new("IntValue", stats) f.Name = "Def"
end)
you might wanna use those don't cha? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 11:40 PM |
| Use adark's, but you might want to change it to child added because player added doesn't work in test mode. |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
| |
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 04 Feb 2012 08:45 AM |
| No. All I want to do is insert IntValues into them. Not create a leaderstat. Uggg |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 08:50 AM |
| Ohhh. Then just remove the part where it instances the leaderstats int. |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Feb 2012 02:46 PM |
| ^^^ dont work because p is issued as player, then it gets issued as the int value. once you do that it will malfunction. It will make everything go in coins. |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Feb 2012 02:53 PM |
Here, I made it the hard, but complete way. He made it so that it puts the leaderstats leaderstats in the player, so it don't work! xD This really is if you want to add function to the seperate Values.
------------------------------------------------------------------ game.Players.PlayerAdded:connect(function (pl)
makeLeaderStats() giveCoins() giveAttack() giveDefense()
end)
function giveCoins()
coins = Instance.new("IntValue", ls).Name = "Coins" end
function giveAttack()
attack = Instance.new("IntValue", ls).Name = "Attack"
end
function giveDefense()
defense = Instance.new("IntValue", ls).Name = "Defense"
end
function makeLeaderStats()
ls = Instance.new("IntValue", pl).Name = "leaderstats"
end |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 02:55 PM |
| oh i forgot, take the leader stats off and switch ls to pl and there you go, its not in leaderstats. |
|
|
| Report Abuse |
|
|
Intune
|
  |
| Joined: 02 Feb 2012 |
| Total Posts: 50 |
|
|
| 04 Feb 2012 03:05 PM |
@cody
That wont work because you never reference 'ls' |
|
|
| Report Abuse |
|
|
Intune
|
  |
| Joined: 02 Feb 2012 |
| Total Posts: 50 |
|
|
| 04 Feb 2012 03:06 PM |
@cody
Sorry, didn't read your second post. |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 09:44 PM |
| @cody; Your script is terrible. |
|
|
| Report Abuse |
|
|
|
| 07 Feb 2012 10:42 AM |
| if you look my first function connect to the last function. LS is then assigned as the leader board. |
|
|
| Report Abuse |
|
|
|
| 07 Feb 2012 03:59 PM |
| Yes, I read your script. No offense, but most of the lines are so unnecessary it makes me wanna explode. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 09:55 AM |
I know i ment that...
I KNOW WHAT THE PROBLEM WITH HIS FIRST SCRIPT WAS! NUMBERS!!!! YOU CANNOT USE NUMBERS IN VARIABLES! ######38572893758923897582375827835789357981089501375073###### |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2012 03:45 PM |
| Yes you can, the numbers just cannot be seperated from the variable name. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2012 06:12 PM |
Bump :3
Yea those numbers are not working for me either way. Together (which i tried the first time and then seperate) |
|
|
| Report Abuse |
|
|