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 » Scripters
Home Search
 

Re: Anyway to make it longer to respawn?

Previous Thread :: Next Thread 
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
14 Nov 2016 07:52 PM
Basically the title.

For example, if someone dies, I want them to be 'dead' longer than it currently is, so I can have a sort of death sequence.
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
14 Nov 2016 07:56 PM
local respawnDelay = 5

game.Players.CharacterAutoLoads = false

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
-- find the humanoid, and detect when it dies
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.Died:connect(function()
wait(respawnDelay)
player:LoadCharacter()
end)
end
end)
player:LoadCharacter() -- load the character for the first time
end)

http://wiki.roblox.com/index.php?title=API:Class/Player/LoadCharacter
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
14 Nov 2016 07:57 PM
oooh, I see now.

Thank you.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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