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: Script help GearRemoveIfDie

Previous Thread :: Next Thread 
thekingkriskras is not online. thekingkriskras
Joined: 08 Jun 2012
Total Posts: 372
29 Mar 2014 05:33 AM
Hello world!

Please give me a script that removes all your gear when you die.

thank you.
Report Abuse
thekingkriskras is not online. thekingkriskras
Joined: 08 Jun 2012
Total Posts: 372
29 Mar 2014 05:35 AM
?
Report Abuse
thekingkriskras is not online. thekingkriskras
Joined: 08 Jun 2012
Total Posts: 372
29 Mar 2014 05:37 AM
?? someone.
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
29 Mar 2014 05:42 AM
When you die all the items in your backpack get removed automaticly.

But I think I might know your problem.
You placed your tools into StarterPack and you want them to stop getting those, isnt it?

You can remove them from that but then nowone who joins will get the weapons anymore.

Put all your tools in one model, call the model 'Tools' and put that in Lighting.

Now add this script to Workspace:



Tools = game.Lighting.Tools:GetChildren()

game.Player.PlayerAdded:connect(function(player)
for i=1 , #Tools do
newTool = Tools[i]:Clone()
newTool.Parent = player.Backpack
end
end)


I think this should do it.
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
29 Mar 2014 05:43 AM
Made a one letter mistake:



Tools = game.Lighting.Tools:GetChildren()

game.Players.PlayerAdded:connect(function(player)
for i=1 , #Tools do
newTool = Tools[i]:Clone()
newTool.Parent = player.Backpack
end
end)
Report Abuse
thekingkriskras is not online. thekingkriskras
Joined: 08 Jun 2012
Total Posts: 372
29 Mar 2014 05:44 AM
thank you.
Il try this script. :)
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
29 Mar 2014 05:46 AM
Another update lol, this time I tested it myself and it works:


Tools = game.Lighting.Tools:GetChildren()

game.Players.PlayerAdded:connect(function(player)
wait(1)
for i=1 , #Tools do
newTool = Tools[i]:Clone()
newTool.Parent = player.Backpack
end
end)
Report Abuse
thekingkriskras is not online. thekingkriskras
Joined: 08 Jun 2012
Total Posts: 372
29 Mar 2014 05:54 AM
great. Im gonna try it later. Im making a rifle first.

thank you so much.
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