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: Dropping gear on death

Previous Thread :: Next Thread 
SirMonkeybutt10 is not online. SirMonkeybutt10
Joined: 10 Jan 2010
Total Posts: 1581
13 Dec 2014 11:29 AM
Hi, I am relatively new to scripting, I just started and am trying to build a game where there is a ball(which is a pickupable gear) and two teams try to grab the ball and get it to the opposite side, where it explodes.
This is my legit first script ever:

local pad = script.Parent

local function steppedOn (part)
local parent = part.Parent

if parent:FindFirstChild ("WarRock") then
print ("ive been touched")
local explosion = Instance.new('Explosion', Workspace)
explosion.Position = pad.Position


end
end

pad.Touched:connect (steppedOn)



And it works fine.
However I am not any sort of expert on scripting tools, and I would like to make it so if a player kills the player with the ball, instead of despawning the ball, the ball just drops to the ground and can be picked up again.
Can anyone point me in the right direction for tutorials or something on this?
Report Abuse
SirMonkeybutt10 is not online. SirMonkeybutt10
Joined: 10 Jan 2010
Total Posts: 1581
13 Dec 2014 11:49 AM
Would recopying the tool to the position of my death work?
Report Abuse
Garnished is not online. Garnished
Joined: 09 Apr 2012
Total Posts: 12695
13 Dec 2014 12:04 PM
game.Players.PlayerAdded:connect(function(_)
_.CharacterAdded:connect(function(__)
__.Humanoid.Died:connect(function()
for _,v in next,__:children''do
if(v:IsA'Tool')then
local newV=v
v.Parent=workspace
v.Handle.Position=__:waitForChild'Torso'.Position+Vector3.new(0,2,0)
end
end)
end)
end)
Report Abuse
SirMonkeybutt10 is not online. SirMonkeybutt10
Joined: 10 Jan 2010
Total Posts: 1581
13 Dec 2014 10:11 PM
I've been adding on to the game, pretty much avoiding the drop all day.

I tried this code out, is there any special changes I need to make, and where should I put this script? I have a script that auto teleports the ball to a specific middle position if it is in the workspace, but once the player picks it up and dies it despawns.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 Dec 2014 10:14 PM
The way Garnished scripts is extremely annoying
Report Abuse
SirMonkeybutt10 is not online. SirMonkeybutt10
Joined: 10 Jan 2010
Total Posts: 1581
13 Dec 2014 10:23 PM
Yeah I agree garnish why do you use the most abstract things as variables?
Report Abuse
SirMonkeybutt10 is not online. SirMonkeybutt10
Joined: 10 Jan 2010
Total Posts: 1581
13 Dec 2014 10:43 PM
bleh this scripting stuff is hard there always seems to be another problem that I don't have the experience to fix.
Report Abuse
Garnished is not online. Garnished
Joined: 09 Apr 2012
Total Posts: 12695
15 Dec 2014 09:55 AM
noobs ur just jelly
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