|
| 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
|
  |
| 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 |
|
|
|
| 15 Jul 2014 08:22 PM |
It's inside the tool. Hellllppppp
Caaaactus. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 15 Jul 2014 08:25 PM |
Put this at the end:
script.Parent.Humanoid.Died:connect(onDeath) |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 15 Jul 2014 08:36 PM |
Islandmaker wins. Thanks, Island.
Caaaactus. |
|
|
| Report Abuse |
|
|
| |
|