|
| 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 |
|
|
|
| 30 Dec 2013 05:40 AM |
| Post.Your.Script.Or.We.Can't.Help.You. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 30 Dec 2013 05:50 AM |
| Don't bump your threads after a minute of no replies. |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 05:51 AM |
| @Triston do I Replace the whole script with that? |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 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 |
|
|
|
| 30 Dec 2013 07:19 AM |
| Thanks so much. Its working now. |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 04:53 PM |
| And i suggest putting the tools into replicatedstorage, not lighting :P |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|