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: Stops when cloned :(

Previous Thread :: Next Thread 
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:44 PM
health = 200
walkspeed = 22
items = script:GetChildren()

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
repeat wait(0.1) until c
if p.TeamColor == game.Teams.Zombies.TeamColor then
c.Humanoid.Name = "Zombie"
c.Zombie.MaxHealth = health
c.Zombie.Health = c.Zombie.MaxHealth
c.Zombie.WalkSpeed = walkspeed
for i,mesh in pairs(c:GetChildren()) do
if mesh:IsA("CharacterMesh") then
mesh:remove()
end
end
for i,new in pairs(items) do
if new:IsA("CharacterMesh") then
new:clone().Parent = c
end
end
c.Head.face.Transparency = 1
if c.Torso:findFirstChild("roblox") then return end
c.Torso.roblox.Transparency = 1
if c:findFirstChild("Shirt") then
c.Shirt:remove()
end
if c:findFirstChild("Pants") then
c.Pants:remove()
end
script.Shirt:clone().Parent = c
script.Pants:clone().Parent = c
c.Head.Mesh:remove()
script.Mesh:clone().Parent = c.Head
if c:findFirstChild("Body Colors") then return end
c["Body Colors"]:remove()
script["Body Colors"]:clone().Parent = c
end
end)
end)

The Health, walkspeed, and the character mesh worked, but everything just freezes. Output: Nothing! Help?
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:48 PM
Bump
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:51 PM
*Sigh*
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Nov 2013 06:52 PM
Where does it freeze?
What line number...
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:53 PM
These works:

health = 200
walkspeed = 22
items = script:GetChildren()

repeat wait(0.1) until c
if p.TeamColor == game.Teams.Zombies.TeamColor then
c.Humanoid.Name = "Zombie"
c.Zombie.MaxHealth = health
c.Zombie.Health = c.Zombie.MaxHealth
c.Zombie.WalkSpeed = walkspeed
for i,mesh in pairs(c:GetChildren()) do
if mesh:IsA("CharacterMesh") then
mesh:remove()
end
end
for i,new in pairs(items) do
if new:IsA("CharacterMesh") then
new:clone().Parent = c
end
end

The rest below it, it wont work.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Nov 2013 06:54 PM
Then
"c.Head.face.Transparency = 1"
must be broken
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:55 PM
Well, I tried checking it... It's correct...
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:56 PM
By the way, if it was broken, it should have shown an error output
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Nov 2013 06:57 PM
I doubt it but it looks like there are too many ends, I will go over it later
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 06:59 PM
If there was too many ends, it will show an error while I am scripting, and the "Go to script error", when right clicked, should have been "pressable"
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 07:03 PM
Help guys?
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 07:08 PM
...............
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Nov 2013 07:20 PM
Guess I am stuck with only this part left
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
05 Nov 2013 10:17 AM
Bumpity bump, now this post is one day old :\
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
05 Nov 2013 10:19 AM
Erm..!
Please read. O.o
http://www.roblox.com/Forum/ShowPost.aspx?PostID=80625843
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