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: How to loadCharacter() from a ls [Local_Script]?

Previous Thread :: Next Thread 
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
17 Apr 2014 01:06 PM
^^yes^^
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
17 Apr 2014 01:12 PM
game:GetService"Players".LocalPlayer:LoadCharacter()
Report Abuse
Tomarty is not online. Tomarty
Joined: 08 Dec 2008
Total Posts: 591
17 Apr 2014 01:24 PM
Easy, don't do it from a local script
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
17 Apr 2014 01:25 PM
@Tomarty, print('get out!') i have to have it local, im using keys and keybyte in a ls for script bulder
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
17 Apr 2014 01:26 PM
You can't. You could make a bindable function if you were in the studio, but you're in script builder, so you can't.
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
17 Apr 2014 01:33 PM
Actually I have no idea what I'm talking about when it comes to them. Never used them.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
17 Apr 2014 01:37 PM
simple,clone the character earlier on..

backup = character:clone()

--when a ky is pressed,blh blah
character:Destroy()
newChar = backup:clone()
newChar.Parent = Workspace
newChar:MakeJoints()
character = newChar
Report Abuse
blueboy112 is not online. blueboy112
Joined: 15 Apr 2009
Total Posts: 802
17 Apr 2014 01:38 PM
You can.

Just have a seperate script handle "requests"

Put a script inside ServerScriptService
Name it "LoadHandler"
Put this inside:

script.ChildAdded:connect(function(Obj)
if Obj.Value ~= nil then
Obj.Value:LoadCharacter()
end
end)

and then, in your local script, you can call a load request like this:

local Prompt = game.ServerScriptService:FindFirstChild("LoadHandler")

local Request = Instance.new("ObjectValue")
Request.Value = game.Players.LocalPlayer
Request.Parent = Prompt

Boom. Done.
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
17 Apr 2014 01:39 PM
For SB... for a KeyPressed..
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
17 Apr 2014 01:43 PM
create/Controller
edit/Controller

script.ChildAdded:connect(function(Obj)
ypcall(function()
if Obj.Value ~= nil then
game.Players[Obj.Value]:LoadCharacter()
end)
end
end)

exit/
run/Controller

--then,if key is "R"..
find = Workspace.Controller
find:ClearAllChildren()
Request = Instance.new("StringValue")
Request.Value = game.Players.LocalPlayer.Name
Request.Parent = find
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