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
 

How to respawn someone from a localscript?

Previous Thread :: Next Thread 
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
24 Jun 2015 01:25 PM
^^^^
I really need it and I saw it somewhere but idk how.



| devTools || You can't flame a man on fire |
Report Abuse
boo871 is not online. boo871
Joined: 18 Jan 2014
Total Posts: 142
24 Jun 2015 01:26 PM
player:LoadCharacter()
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
24 Jun 2015 01:29 PM
That doesn't work from a localscript.



| devTools || You can't flame a man on fire |
Report Abuse
Scripterity is not online. Scripterity
Joined: 30 Mar 2014
Total Posts: 677
24 Jun 2015 01:30 PM
http://wiki.roblox.com/index.php?title=API:Class/RemoteFunction
http://wiki.roblox.com/index.php?title=API:Class/RemoteFunction/InvokeServer
http://wiki.roblox.com/index.php?title=API:Class/RemoteFunction/OnServerInvoke
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
24 Jun 2015 01:30 PM
Maybe use a remoteevent that makes a normal scrit use the LoadCharacter command?


eww no pink shaggy
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
24 Jun 2015 01:31 PM
I thought of that, but then how would I find that specific player's name to load them?


| devTools || You can't flame a man on fire |
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
24 Jun 2015 01:33 PM
You can send arguments through remote events and functions. By default, the first argument the server recieves will always be the player, and it will always recieve it no matter what.

------------------

event = game.Workspace.LoadCharacterEvent
event:InvokeServer()

------------------

event = game.Workspace.LoadCharacterEvent
event.OnServerEvent:connect(function(plr)
plr:LoadCharacter()
end)

------------------


eww no pink shaggy
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
24 Jun 2015 01:34 PM
Lil' mistake here ; if you're going to use events instead of functions, then the second line should be "event:FireServer()".


eww no pink shaggy
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