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 » Scripters
Home Search
 

Re: How can I make a Game Pass give you a certain item?

Previous Thread :: Next Thread 
Genuinebagel is not online. Genuinebagel
Joined: 18 Jun 2013
Total Posts: 490
17 Dec 2014 09:53 PM
Here is what I tried

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if game:GetService("GamePassService"):PlayerHasPass(player, PassID) then
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
end
end)

It works, but when you die, it doesn't come back.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
17 Dec 2014 09:55 PM
Parent it into player.StarterGear
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
17 Dec 2014 09:57 PM
^
Report Abuse
Genuinebagel is not online. Genuinebagel
Joined: 18 Jun 2013
Total Posts: 490
17 Dec 2014 10:01 PM
Do you suppose you know why it makes two of them instead of one?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
17 Dec 2014 10:03 PM
Your code makes two of them because you have two lines that clone it:P

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if game:GetService("GamePassService"):PlayerHasPass(player, PassID) then
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.StarterGear
end
end)
Report Abuse
Genuinebagel is not online. Genuinebagel
Joined: 18 Jun 2013
Total Posts: 490
17 Dec 2014 10:04 PM
nvm lawl!
Report Abuse
Genuinebagel is not online. Genuinebagel
Joined: 18 Jun 2013
Total Posts: 490
17 Dec 2014 10:04 PM
instead of that solution I did this

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if game:GetService("GamePassService"):PlayerHasPass(player, PassID) then
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("SWORDNAMEHERE"):Clone().Parent = player.StarterGear
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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