generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: VIP help:

Previous Thread :: Next Thread 
mage11561 is not online. 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
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
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 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
31 Dec 2011 03:41 PM
@Raven,
that didn't work >.<
Report Abuse
iamcodyw62 is not online. iamcodyw62
Joined: 05 Sep 2011
Total Posts: 164
31 Dec 2011 03:47 PM
[ Content Deleted ]
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
31 Dec 2011 03:50 PM
@iam,
how does that answer my question? ._.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
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 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
31 Dec 2011 04:00 PM
@Raven,
that worked, thanks :D
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
31 Dec 2011 04:03 PM
You're welcome! And have a happy newyear.
Report Abuse
iamcodyw62 is not online. iamcodyw62
Joined: 05 Sep 2011
Total Posts: 164
31 Dec 2011 04:12 PM
who reported me for saying fail? the mods banned me.


WHAT THE FIK
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image