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
 

Help with this script

Previous Thread :: Next Thread 
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 03:24 PM
This script is supposed to find a tool named "Gold Cup" in Lighting and give it to a player who has a certain gamepass

local VIPTools = game.Lighting:WaitForChild ("Gold Cup")
function givetool (player)
if game:GetService("GamePassService"):PlayerHasPass(player, 321688730) then
wait(2)
VIPTools:Clone().Parent = player:WaitForChild ("BackPack")
VIPTools:Clone().Parent = player:WaitForChild ("StarterPack")
end
end

game.Players.PlayerAdded:connect (givetool)
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Dec 2015 03:27 PM
Backpack*
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 03:29 PM
Fixed that but it still doesn't work
Report Abuse
LicePro is not online. LicePro
Joined: 08 Dec 2015
Total Posts: 467
31 Dec 2015 03:32 PM
First Clone it.
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 03:42 PM
@Lice what do you mean?
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 03:49 PM
Bump
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
31 Dec 2015 04:04 PM
Isn't it StarterGear?
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 04:06 PM
@dennis No
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
31 Dec 2015 04:07 PM
game.StarterPack
game.Players.SomePlayer.StarterGear

You're doing SomePlayer.StarterPack.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
31 Dec 2015 04:09 PM
@Dennis, he's already defined the variable for the player.
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
31 Dec 2015 04:13 PM
StarterPack belongs in game data model; StarterGear belongs in a player. He's trying to access StarterPack inside of a player.

http://wiki.roblox.com/index.php?title=API:Class/StarterPack
http://wiki.roblox.com/index.php?title=API:Class/StarterGear
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
31 Dec 2015 04:51 PM
Bump
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