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: Respawning players without taking a WO

Previous Thread :: Next Thread 
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
19 Jan 2014 08:05 PM
How exactly would I do this? Right now I am just teleporting the player to the spawn, but I want to do something similar to how Kohl's does it.
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
19 Jan 2014 08:06 PM
:respawn me
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 08:06 PM
What exactly is a 'WO'?.. Wipe Out?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 08:07 PM
Oh I see what you mean.

The script to respawn a player is;

game.Players.PlayerName:LoadCharacter()

Manipulate that to your needs.
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
19 Jan 2014 08:07 PM
Yes, a Wipeout.

And I need to figure out how to script that, not just use the Kohl's command.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 08:09 PM
So what are you trying to do?
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
19 Jan 2014 08:09 PM
:LoadCharacter() Method..
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 08:29 PM
I don't think he knows how to manipulate that to his needs.. I'm guessing he wants it for all characters, if so;

for i,v in pairs(game.Players:GetChildren()) do
v:LoadCharacter()
end
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
19 Jan 2014 09:13 PM
No, I got it to work in Studio. When I play it solo, it works (I made a Spectate Gui for a SF game I'm making, when you click it you are put onto the Spectators team and respawned). But, when I test it in game, it doesn't work.. Here's the code:

player = script.Parent.Parent.Parent.Parent.Parent

if player.TeamColor == BrickColor.new("Institutional white") then
script.Parent.Text = "Fight"
else
script.Parent.Text = "Spectate"
end

script.Parent.MouseButton1Click:connect(function()
if script.Parent.Text == "Spectate" then
local plyr = script.Parent.Parent.Parent.Parent.Parent.Parent.LocalPlayer
plyr.TeamColor = BrickColor.new("Institutional white")
plyr:LoadCharacter()
end
end)

script.Parent.MouseButton1Click:connect(function()
if script.Parent.Text == "Fight" then
local plyr = script.Parent.Parent.Parent.Parent.Parent.Parent.LocalPlayer
plyr.TeamColor = BrickColor.new("Really black")
plyr:LoadCharacter()
end
end)
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
19 Jan 2014 09:14 PM
Btw, I know the code is poorly written, I'm kinda making this game really quickly.
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