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: Does anyone know how to fix this?

Previous Thread :: Next Thread 
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 05:39 AM
I made 2 gamepasses for my game that give you some gear but when if you die twice you loose it in game. Does anyone know how to fix it?
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
30 Dec 2013 05:40 AM
Post.Your.Script.Or.We.Can't.Help.You.
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 05:45 AM
wait(2) --Keep at 2 for safety.

gpid = 140388529 --Game Pass ID
tools = {"HoverBoard", "", ""} --Put VIP tools in Lighting, then put their exact names here.

GPS = Game:GetService("GamePassService")
function respawned(char)
player = game.Players:FindFirstChild(char.Name)
print("Respawned")
if char:FindFirstChild("Head") ~= nil then
print("It's a Player!")
if GPS:PlayerHasPass(player, gpid) then
print("Has GPID")
for i = 1,#tools do
game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Backpack
end
else
print("No GPID")
end
end
end
game.Workspace.ChildAdded:connect(respawned)
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 05:46 AM
Bump
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
30 Dec 2013 05:49 AM
game.Players.PlayerAdded:connect(function(player)
if Game:GetService("GamePassService"):PlayerHasPass(player, 140388529) then
game.Lighting:FindFirstChild("HoverBoard"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("HoverBoard"):Clone().Parent = player.StarterGui
end
end)
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
30 Dec 2013 05:50 AM
Don't bump your threads after a minute of no replies.
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 05:51 AM
@Triston do I Replace the whole script with that?
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
30 Dec 2013 05:52 AM
Yes.
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 05:59 AM
@Triston That did not fix it. Now you loose it when you die once I want it where you dont loose the tools no matter how many times you die. Thanks for trying tho.
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:04 AM
Bump.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
30 Dec 2013 06:08 AM
Don't clone it into backpack, clone it to starterpack
Or i think the name is startergear

If it doesn't work use a character added function
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:21 AM
@Kiwi That did not work.
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:24 AM
Bump
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:29 AM
Hm
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:37 AM
Anyone?
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
30 Dec 2013 06:50 AM
Yes Kiwi, you're right. It was being cloned into StarterGui instead of StarterGear, whoops.

Use this instead:

game.Players.PlayerAdded:connect(function(player)
if Game:GetService("GamePassService"):PlayerHasPass(player, 140388529) then
game.Lighting:FindFirstChild("HoverBoard"):Clone().Parent = player.Backpack
game.Lighting:FindFirstChild("HoverBoard"):Clone().Parent = player.StarterGear
end
end)
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 07:19 AM
Thanks so much. Its working now.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
30 Dec 2013 04:53 PM
And i suggest putting the tools into replicatedstorage, not lighting :P
Report Abuse
masterbeyblade21 is not online. masterbeyblade21
Joined: 02 Jun 2012
Total Posts: 8877
30 Dec 2013 06:36 PM
Also this is the game that was for
http://www.roblox.com/Roblox-Snowboarding-place?id=138792974
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