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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: My morph button clones multiple times? please help...

Previous Thread :: Next Thread 
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 06:25 AM
g = script.Parent.Parent.leavealone
color = script.Parent

My script:

debounce = false

function torso(hit)
if debounce == true then return end
debounce = true
torso = g.torso:clone()
local char = hit.Parent:FindFirstChild("Humanoid")
if char then
torso.Parent = char.Parent
color.BrickColor = BrickColor.new("Really red")
color.Transparency = 0.5
wait(3)
color.BrickColor = BrickColor.new("Really black")
color.Transparency = 0
debounce = false
end
end

script.Parent.Touched:connect(torso)


I have debounce in it so it shouldn't clone more than once but it is cloning it twice please help I am new to debounce and just now read about them so I tried to give it a shot I read about them in the wiki but as you can see it didn't work and if LegoKid135 read's this I read this out of your scripting book and put it in my script just like it said and it didn't work please help.
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 07:08 AM
BUMP
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 May 2012 07:09 AM
Are there two scripts in there?
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 07:16 AM
theres 5 scripts one for each body piece but only the torso has the color changing part in it. There is no clone of any script.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 May 2012 07:17 AM
And how do you know it creates two torsos? I think they're two because it doesn't remove the old one.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 May 2012 07:18 AM
And where did you even define "torso" in the script? You know it has the same name as the function.
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 07:28 AM
I am putting a ROBLOXian 2.0 Torso in the character and when I tested it in Play Solo mode I stepped on the button and it made 2 of each ROBLOXian 2.0 body pieces I am trying to make it only put one in there because as you can see there isn't another one in there my body is square so then there will not be any ROBLOXian 2.0 meshes inside of it the script works great it just puts 2 of everything in it.
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 07:30 AM
And I defined 'torso' right underneath debounce = true right above the line where it finds the humanoid.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 May 2012 07:32 AM
Oh sry. I think I'm a little bit away somehow.

So there's something named "torso" inside that "leavemealone"?
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 May 2012 07:33 AM
*leavealone
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 07:37 AM
yes I renamed 'ROBLOXian 2.0 Torso' to 'torso' inside that group.
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
03 May 2012 11:50 AM
Bump! http://www.roblox.com/multiple-body-parts-item?id=79267239 I don't know if that was approved yet but look at it. It shows my character after stepping on my morph and it shows how many body parts was cloned this is the bear morph it is not yet released to public but will be soon.
Report Abuse
DawgINC is not online. DawgINC
Joined: 27 Apr 2012
Total Posts: 156
04 May 2012 12:15 PM
Bumpity Bump Bump!
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