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: Died

Previous Thread :: Next Thread 
smellypencil is not online. smellypencil
Joined: 20 Nov 2009
Total Posts: 424
05 Sep 2011 06:57 PM
Ok, I need help, I can't figure out how to use the Died function. Lets say i'm making a custom spawn without a spawn location so when the Player dies I want it to teleport to the custom spawn in this case (T1) would I do this or is there a different
way?:
player = script.Parent
while true do
if player.Humanoid.Health == 0 then
wait(0.1)
player.MoveTo(Workspace.T1.Position)
wait()
end
it doesn't look right i'm pretty sure there is a different way. Can anybody help? Thanks for your time I appreciate you reading this.
Report Abuse
smellypencil is not online. smellypencil
Joined: 20 Nov 2009
Total Posts: 424
05 Sep 2011 06:59 PM
Excuse my error i meant Player:MoveTo() btw
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
05 Sep 2011 07:00 PM
game.Players.PlayerAdded:connect(function(player)
player.ChildAdded:connect(function(character)
character.Humanoid.Died:connect(function(died)
--stuff
end)
end)
end)

­<'+1 Post. Ujelly?'>
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Sep 2011 07:02 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c:MoveTo(Workspace.T1.Position)
end)
end)


-Like an __AWESOME__ boss
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
05 Sep 2011 07:02 PM
player = script.Parent
while true do
if player.Humanoid.Health == 0 then
wait(0.1)
player:MoveTo(Workspace.T1.Position) --You have to put a : not a .
wait()
end

'_' LOLHAI
Report Abuse
meteorit210 is not online. meteorit210
Joined: 08 Sep 2010
Total Posts: 348
05 Sep 2011 07:07 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect(function()
c:MoveTo(game.Workspace.T1.Position
end)
end)
end)

Youre all wrong
Report Abuse
meteorit210 is not online. meteorit210
Joined: 08 Sep 2010
Total Posts: 348
05 Sep 2011 07:07 PM
whoops add a ) after position
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
05 Sep 2011 07:08 PM
^Lolwut? You just copied mine, and rewrote the tags, and just copied his line of code and forgot a parenthesis. You're wrong.

­<'+1 Post. Ujelly?'>
Report Abuse
meteorit210 is not online. meteorit210
Joined: 08 Sep 2010
Total Posts: 348
05 Sep 2011 07:14 PM
Yes but yours would fire any time something was put in the player
mine only fires with the character being added
So your wrong
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
05 Sep 2011 07:17 PM
Please tell me I didn't use 'ChildAdded'

*Looks*

YOU HAVE GOT TO BE KIDDING ME.

For some reason I constantly do that when meaning to put characteradded >.<

­<'+1 Post. Ujelly?'>

­<'+1 Post. Ujelly?'>
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