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
 

HELP ME, I HAVE 10 MINS TO GET THIS DONE!

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
15 Jul 2014 08:20 PM
This is the problem: The bomb starts off in workspace, so it can't detect character. There can only be one the entire game. That's why I anchor it. It's for a payload type game.

21:19:08.292 - Humanoid is not a valid member of Workspace
21:19:08.293 - Script 'Workspace.Bomb.DropWeapon', Line 24
21:19:08.293 - Stack End



Tool = script.Parent
local Char = script.Parent.Parent

function onDeath()

if Tool.Parent == Char then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = game.Workspace.BombSpawn.Position
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end

script.Parent.Parent.Humanoid.Died:connect(onDeath)

Caaaactus.
Report Abuse
Astrain1 is not online. Astrain1
Joined: 27 Mar 2013
Total Posts: 18697
15 Jul 2014 08:22 PM
Where is the script?

If it's in the character,

script.Parent.Parent.Humanoid.Died:connect(onDeath)

becomes:

script.Parent.Humanoid.Died:connect(onDeath)


~ copyright, right until you die >:C
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
15 Jul 2014 08:22 PM
It's inside the tool. Hellllppppp

Caaaactus.
Report Abuse
Inspectial is not online. Inspectial
Joined: 07 Oct 2012
Total Posts: 1018
15 Jul 2014 08:23 PM
Tool = script.Parent
local Char = script.Parent.Parent

function onDeath()

if Tool.Parent == Char then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = Vector3.new(game.Workspace.BombSpawn.Position)
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end

script.Parent.Parent.Humanoid.Died:connect(onDeath)
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
15 Jul 2014 08:24 PM
21:24:01.725 - Humanoid is not a valid member of Workspace
21:24:01.726 - Script 'Workspace.Bomb.DropWeapon', Line 23
21:24:01.727 - Stack End


The tool starts out in workspace, guys!

Caaaactus.
Report Abuse
Astrain1 is not online. Astrain1
Joined: 27 Mar 2013
Total Posts: 18697
15 Jul 2014 08:24 PM
Tool = script.Parent


Tool.Equipped:connect(function()
function onDeath()

local Char = script.Parent.Parent
if Tool.Parent == Char then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = game.Workspace.BombSpawn.Position
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end
end)

script.Parent.Parent.Humanoid.Died:connect(onDeath)


~ copyright, right until you die >:C
Report Abuse
Inspectial is not online. Inspectial
Joined: 07 Oct 2012
Total Posts: 1018
15 Jul 2014 08:25 PM
Put this at the end:


script.Parent.Humanoid.Died:connect(onDeath)
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
15 Jul 2014 08:26 PM
@as nope.
21:25:28.998 - Humanoid is not a valid member of Workspace
21:25:28.999 - Script 'Workspace.Bomb.DropWeapon', Line 26
21:25:28.999 - Stack End

Caaaactus.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Jul 2014 08:26 PM
Tool = script.Parent

function onDeath()

if Tool.Parent == Char then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = game.Workspace.BombSpawn.Position
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end
Tool.Equipped:connect(function()
if Tool.Parent:findFirstChild("Humanoid") then
Char = Tool.Parent
Char.Humanoid.Died:connect(onDeath)
end)
Report Abuse
Astrain1 is not online. Astrain1
Joined: 27 Mar 2013
Total Posts: 18697
15 Jul 2014 08:27 PM
Tool = script.Parent


Tool.Equipped:connect(function()
script.Parent.Parent.Humanoid.Died:connect(function()

local Char = script.Parent.Parent
if Tool.Parent == Char then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = game.Workspace.BombSpawn.Position
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end
end)
end)


~ copyright, right until you die >:C
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
15 Jul 2014 08:31 PM
Tool = script.Parent
isE = false
Tool.Equipped:connect(function(mouse) isE = true end)
function onDeath()
if isE then
if Tool.Parent:IsA"Character" then
Tool.Parent = game.Workspace
Tool.Handle.Anchored = true
wait(2)
Tool.Handle.Anchored = false
wait(18)
if Tool.Parent == game.Workspace then
bomb.Handle.Position = game.Workspace.BombSpawn.Position
local h = Instance.new("Message", game.Workspace)
h.Text = "The bomb was respawned."
wait(3)
h:remove()
else
end
end
end
end
script.Parent.Parent.Humanoid.Died:connect(onDeath)
Tool.Unequipped:connect(function(mouse) isE = false end)
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
15 Jul 2014 08:36 PM
Islandmaker wins. Thanks, Island.

Caaaactus.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Jul 2014 08:42 PM
np
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