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: Custom character

Previous Thread :: Next Thread 
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:04 PM
So i made this script and for some reason i keep respawning over and over... but i do not know what is going on.. Basicly the script says: "When the player spawns and they do not have a wand in there character then set there character to "BLANK", But if they spawn and they do have a wand just do nothing.." but for some reason it keeps making a new character over and over.... someone help

-------

game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
wait(2)
if Character:FindFirstChild("Wand") then
print("There is a wand")
elseif Character:FindFirstChild("Wand") == nil then
print("There is no wand")
Char = game.ReplicatedStorage.Dummy:clone()
Char.Parent = game.Workspace
Char.Name = Player.Name
Player.Character = Char
wait(1)
if not Player.Backpack:FindFirstChild("LocalScript") then
game.ReplicatedStorage.LocalScripts.LocalScript:clone().Parent = Player.Backpack
end
end
end)
end)

-------
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:11 PM
B
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:15 PM
Someone please help me.
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
07 Mar 2015 04:18 PM
thats cos I think ur 1st Checking for the Wand and THEN u Make a New Character for the Player :P

u gotta do the Opposite...
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:21 PM
Even if i did the oppisite i would get the same result since there still checking for the same things (I did try it still, Did the same thing.)
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:28 PM
B
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
07 Mar 2015 04:37 PM
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
wait(1)
Char = game.ReplicatedStorage.Dummy:clone()
Char.Parent = game.Workspace
Char.Name = Player.Name
Player.Character = Char
wait(2)
if Character:FindFirstChild("Wand") then
print("There is a wand")
elseif not Character:FindFirstChild("Wand") then
print("There is no wand")
end
if not Player.Backpack:FindFirstChild("LocalScript") then
game.ReplicatedStorage.LocalScripts.LocalScript:clone().Parent = Player.Backpack
end
end)
end)

u tried this???
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:42 PM
Yes your way made it worse.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
07 Mar 2015 04:46 PM
Join my game called Secret WIP, is this what wyou mean buy custom character?
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 04:51 PM
No, my custom character is a actual character with a humanoid and everything it just has a extra brick attached to it with it motor 6D onto the torso.
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
07 Mar 2015 05:40 PM
well I tried doing this with CharacterAutoLoads = true
but it was quiet impossible cos of all the Errors and stuff...

so I just did it without CharacterAutoLoads :P
my Test Place is an example of Custom Characters...
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 05:54 PM
I turned CharacterAutoLoad off and it still respawns the character :/
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
07 Mar 2015 06:16 PM
o.O
I don't think so :/
cos it SHOULD NOT Respawn a Character Automatically with it Off...
so I think u either mixed false up with true or there's some hidden script or something that Automatically Spawns a Character for ya :/
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 06:34 PM
I relooked everything, Nothing respawns it :/.. roblox bug?
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
07 Mar 2015 07:11 PM
hmmm... Strange :/
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
07 Mar 2015 07:41 PM
Like it only respawns the character when i change the character....
Report Abuse
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
07 Mar 2015 09:07 PM
It's the CharacterAdded function.
It keeps Creating a new Model for the Character and "Loops" because you're setting a new Character for the Player which is the "Dummy" from the Replicated Storage.
Report Abuse
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
07 Mar 2015 09:52 PM
Activated = false

local function CreateCharacter( Player )
if Activated then
return
end
wait(2)
local Character = Player.Character
if Character:FindFirstChild("Wand") then
print("There is a wand")
elseif Character:FindFirstChild("Wand") == nil then
print("There is no wand")
local Char = game.ReplicatedStorage.Dummy:clone()
Char.Parent = game.Workspace
Char.Name = Player.Name..'2'
Activated = true
Player.Character = Char
local Humanoid = Char:FindFirstChild( 'Humanoid' )
Humanoid.Died:connect(function()
Activated = false
end)
wait(1)
if not Player.Backpack:FindFirstChild("LocalScript") then
game.ReplicatedStorage.LocalScripts.LocalScript:clone().Parent = Player.Backpack
end
end
end

game.Players.PlayerAdded:connect(function(Player)
CreateCharacter( Player )
Player.CharacterAdded:connect(function()
CreateCharacter( Player )
end)
end)
Report Abuse
djboy is not online. djboy
Joined: 16 Mar 2008
Total Posts: 794
08 Mar 2015 10:50 PM
Still respawns, This might be a roblox bug.
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
09 Mar 2015 07:16 AM
lol forgot about the Event and the Making of a New Character wen 1 is already made...
of course I didn't Read the guy from above Script, it's a lil long so I couldn't be bothered XD

local spawned = false

plr.CharacterAdded:connect(function()
if not spawned then
--Character Creation/Cloning here
spawned = true
end
end)

try this... I just don't know wen u want to Replace Characters so I just made it 1 Time use...
and don't forget to define plr XD am just kinda not into Typing every single Detail...
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