|
| 30 Apr 2013 06:26 PM |
Did I do this right?
[ I actually had no idea what to do, so I guessed o_O ]
x = ? y = ? -- Yeah forums, I'll add in position later... z = ?
function Death(player) player.Torso.MoveTo.Position = Vector3.new(x,y,z) end
script.Parent.Human.Died:connect(Death)
When the enemy dies, the killer will be teleported to the spawn.
[ Or do I need make it like this ]
function Death(player) if player:findFirstChild("Humanoid") then player.Torso.MoveTo.Position = Vector3.new(x,y,z)
end end
script.Parent.Human.Died:connect(Death)
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:27 PM |
player.Torso.MoveTo.Position = Vector3.new(x,y,z)
should be player.Torso.Position = Vector3.new(x,y,z)--assuming player is defined as the character
Also:
script.Parent.Humanoid.Died--unless you named the Humanoid Human o-o |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:29 PM |
| I did name the HUmanoid Human, it's for an RPG boss, you kill it, sends you to spawn. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:29 PM |
Wait, I don't even think the Died event gives an argument o-o
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:30 PM |
[ Free modelzz script incoming ]
name="Human"
robo=script.Parent:clone()
function Dead() wait(10) robot=robo:clone() robot.Parent=script.Parent.Parent robot:makeJoints() script.Parent:remove() end
script.Parent.Human.Died:connect(Dead)
I guessed it would work from that respawn script. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:38 PM |
Here:
x = 0 y = 0 z = 0
function Death() for i,v in pairs(game.Players:GetPlayers()) do if v.Character then if (v.Character.Torso.Position-script.Parent.Head.Position)<=10 then--Distance v.Character.Torso.CFrame = CFrame.new(x,y,z)--It would kill the player if you used 'position' end end end
script.Parent.Human.Died:connect(Death) |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:39 PM |
| If it works then I love you. I'll respond in a bit. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 06:43 PM |
--WHOOPS FORGOT AN END
x = 0 y = 0 z = 0
function Death() for i,v in pairs(game.Players:GetPlayers()) do if v.Character then if (v.Character.Torso.Position-script.Parent.Head.Position)<=10 then--Distance v.Character.Torso.CFrame = CFrame.new(x,y,z)--It would kill the player if you used 'position' end end end end
script.Parent.Human.Died:connect(Death) |
|
|
| Report Abuse |
|
|