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: Ok hopefully the last question.

Previous Thread :: Next Thread 
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 10:18 PM
I have finally gotten this script to work in a server but for some reason it respawns the players like a second after they morph, and there's nothing in the output. I apologize if this question has an obvious answer and if the script looks inefficient, I'm really tired.

local char = game.ServerStorage:WaitForChild("Characters")
print("Found")
local Chars = char:GetChildren()
function Morph()
wait (10)
print ("Started")
for i, player in ipairs(game.Players:GetChildren()) do
if player.Character and player.Character:FindFirstChild("Torso") then
local New = Chars[math.random(1, #Chars)]
local Taken = New:WaitForChild("IsTaken")
if Taken.Value == false then
Taken.Value = true
New.Parent = game.Workspace
New:MakeJoints()
local CharCam = script.Camera:Clone()
CharCam.Parent = player.PlayerGui
local CharName = script.Value:Clone()
CharName.Value = New.Name
CharName.Parent = CharCam
player.Character:Destroy()
player.Character = New
elseif Taken.Value == true then
print("This char is taken!")
Morph()
end
end
end
end
Morph()
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 10:40 PM
Help please, at least show me a line that's a possible culprit.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
30 May 2015 10:41 PM
Players.CharacterAutoLoads

Set it to false.


I script -~ chimmihc
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 10:43 PM
Ooh, if you don't mind me asking, what does that do?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 10:48 PM
Ok I added that and now my player isn't spawning at all.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 10:53 PM
Here:

game.Players.CharacterAutoLoads = false
local char = game.ServerStorage:WaitForChild("Characters")
print("Found")
local Chars = char:GetChildren()
function Morph()
wait (20)
print ("Started")
for i, player in ipairs(game.Players:GetChildren()) do
if player.Character and player.Character:FindFirstChild("Torso") then
local New = Chars[math.random(1, #Chars)]
local Taken = New:WaitForChild("IsTaken")
if Taken.Value == false then
Taken.Value = true
New.Parent = game.Workspace
New:MakeJoints()
local CharCam = script.Camera:Clone()
CharCam.Parent = player.PlayerGui
local CharName = script.Value:Clone()
CharName.Value = New.Name
CharName.Parent = CharCam
player.Character:Destroy()
player.Character = New
player:LoadCharacter()
elseif Taken.Value == true then
print("This char is taken!")
Morph()
end
end
end
end
Morph()
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
30 May 2015 11:34 PM
HELPPPPP
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
30 May 2015 11:36 PM
plr:LoadCharacter()

use it somewhere
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