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: OnDied Scripts

Previous Thread :: Next Thread 
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
27 Oct 2012 11:03 AM
I can't figure out how to make an OnDied script that isn't an OnRespawned script. I need to make this so I can make a script that lets you manually respawn once you die. There's no point in letting you manually respawn once you respawn.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
27 Oct 2012 11:05 AM
game.Players.PlayerAdded:connect(function(player)
if player.Character.Humanoid.Health = 0 then
player:LoadCharacter()
end
end)



Not sure if that would work or not.

Tactical Rainboom Inbound
Report Abuse
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
27 Oct 2012 11:06 AM
I'll try modifying that to make it give you a GUI once you die.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Oct 2012 11:07 AM
Not sure about player:LoadCharacter(), but:

game.Players.PlayerAdded:connect(function(player)
if player.Character.Humanoid.Health == 0 then
player:LoadCharacter()
end
end)
double = at line 2
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
27 Oct 2012 11:08 AM
Oh, yeah. Darn, I always forget the double = :P

Tactical Rainboom Inbound
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Oct 2012 11:09 AM
I always forget wait()'s in while true do xD
Report Abuse
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
27 Oct 2012 11:11 AM
@gerit99 - You don't have to know what to do with LoadCharacter. The script is supposed to give you a GUI in StarterGui (called LoadScreen) that allows you to respawn, not automatically respawn you. That script you fixed doesn't work with the double either.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Oct 2012 11:15 AM
Then loadCharacter doesn't work.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
27 Oct 2012 11:19 AM
Okay, I'll give you a script to put in a text button (put in a local script)

script.Parent.MouseButton1Down:connect(function()
game.Players.LocalPlayer:LoadCharacter()
end

I think it'd be that simple.

Tactical Rainboom Inbound
Report Abuse
superdimensionmaster is not online. superdimensionmaster
Joined: 18 Jan 2008
Total Posts: 8387
27 Oct 2012 11:19 AM
LoadCharacter works. I am using it right now. I also found a different way to solve the problem, so I don't need this thread anymore.
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