mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 31 Dec 2011 03:36 PM |
This should work but it doesn't:
VIP = {"mage11561", "pwow", "TheBladeMaster1337", "H0lYGuardian"} pistol = game.Lighting.Pistol local function PlayerAdded(player) if player.Name == VIP[1] or VIP[2] or VIP[3] or VIP[4] then pist = pistol:clone() pist.Parent = player.StarterPack end end game.Players.PlayerAdded:connect(PlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2011 03:39 PM |
VIP = {"mage11561", "pwow", "TheBladeMaster1337", "H0lYGuardian"} pistol = game.Lighting.Pistol local function PlayerAdded(player) if player.Name == VIP[1] or VIP[2] or VIP[3] or VIP[4] then pist = pistol:clone() pist.Parent = player.StarterPack end end game.Players.PlayerAdded:connect(PlayerAdded)
Your problem lies in line 4. You pretty much firs task if the player.Name == VIP[1], then if VIP[2] to VIP[4] exists - not if it equals player.Name. ;)
Try something like this:
VIP = {"mage11561", "pwow", "TheBladeMaster1337", "H0lYGuardian"} pistol = game.Lighting.Pistol local function PlayerAdded(player) for _, v in pairs(VIP) do if player.Name == v then pist = pistol:clone() pist.Parent = player.StarterPack end end end game.Players.PlayerAdded:connect(PlayerAdded) |
|
|
| Report Abuse |
|
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 31 Dec 2011 03:41 PM |
@Raven, that didn't work >.< |
|
|
| Report Abuse |
|
|
| |
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 31 Dec 2011 03:50 PM |
@iam, how does that answer my question? ._. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2011 03:53 PM |
My bad!
VIP = {"mage11561", "pwow", "TheBladeMaster1337", "H0lYGuardian"} pistol = game.Lighting.Pistol
function PlayerAdded(player) for _, v in ipairs(VIP) do -- "ipairs" added since it's a table if player.Name:lower() == v:lower() then -- :lower() added, to make sure capit. doesn't matter pist = pistol:clone() pist.Parent = player.StarterGear -- there is no "StarterPack" in the player directory end end end game.Players.PlayerAdded:connect(PlayerAdded)
Try that. Else, I'll continue troubleshooting my mess, |
|
|
| Report Abuse |
|
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 31 Dec 2011 04:00 PM |
@Raven, that worked, thanks :D |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2011 04:03 PM |
| You're welcome! And have a happy newyear. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2011 04:12 PM |
who reported me for saying fail? the mods banned me.
WHAT THE FIK |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2011 04:15 PM |
@iam Why would you do that in the first place?
~ [I don't script scripts; I script IMPORTED scripts.] ~ |
|
|
| Report Abuse |
|
|