Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
Double Clone?

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Mon May 26, 2008 1:26 am    Post subject: Double Clone? Reply with quote

Why when I touch the clone button, I get two copys of clones? Here is the script:

function onTouch(hit)
p = game.Players:playerFromCharacter(hit.Parent)
if p~=nil then
ff = script.Parent.Parent.Figure1:findFirstChild("Freaked"):clone()
ff:findFirstChild("Head").BrickColor = p.Character:findFirstChild("Head").BrickColor
ff:findFirstChild("Torso").BrickColor = p.Character:findFirstChild("Torso").BrickColor
ff:findFirstChild("Right Arm").BrickColor = p.Character:findFirstChild("Right Arm").BrickColor
ff:findFirstChild("Right Leg").BrickColor = p.Character:findFirstChild("Right Leg").BrickColor
ff:findFirstChild("Left Leg").BrickColor = p.Character:findFirstChild("Left Leg").BrickColor
ff:findFirstChild("Left Arm").BrickColor = p.Character:findFirstChild("Left Arm").BrickColor
ff.Parent = workspace
ff:MoveTo(p.Character.Torso.Position + Vector3.new(0, 0, 10))
ff:MakeJoints()
ff.Name = p.Name .. ""
ff.Torso.Locked = false
ff.Head.Locked = false
ps1 = p.Character:findFirstChild("Shirt")
if ps1==nil then return "moo" end
ps = ps1:clone()
ps.Parent = ff
pp1 = p.Character:findFirstChild("Pants")
if pp1==nil then return "moo" end
pp = pp1:clone()
pp.Parent = ff
wait(5)
else return "not a player"

end
end

Please help! Very Happy
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
SirGelatina
Site Admin


Joined: 01 Mar 2008
Posts: 116
Location: Behind you

PostPosted: Mon May 26, 2008 6:32 pm    Post subject: Reply with quote

Because you need a debounce!
And something like this is easier:

Code:
local debounce = false

function onTouched(Toucher)
   local player = game.Players:playerFromCharacter(Toucher.Parent)
   if player ~= nil and debounce == false then
      debounce = true
      local torsopos = Toucher.Parent.Torso.Position
      local list = Toucher.Parent:getChildren()
      local model = Instance.new("Model")
      for x=1, #list do
         local clone = list[x]:clone()
         if clone ~= nil then
            clone.Parent = model
         end
      end
      model:makeJoints()
      model:MoveTo(Vector3.new(torsopos.x, torsopos.y + 10, torsopos.z))
      model:makeJoints()
      model.Parent = Toucher.Parent.Parent
      model:MoveTo(Vector3.new(torsopos.x, torsopos.y + 10, torsopos.z))
      model:makeJoints()
      wait(3)
      debounce = false
   end
end

script.Parent.Touched:connect(onTouched)


Last edited by SirGelatina on Wed May 28, 2008 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail MSN Messenger
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Wed May 28, 2008 4:38 am    Post subject: Reply with quote

Sorry but it doesn't work Crying or Very sad
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
SirGelatina
Site Admin


Joined: 01 Mar 2008
Posts: 116
Location: Behind you

PostPosted: Wed May 28, 2008 7:10 pm    Post subject: Reply with quote

You tested it online or offline? I tested offline and it worked. Take the code again from there. I made some changes.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Fri May 30, 2008 1:40 am    Post subject: Reply with quote

I want to ask. When you touch it, how would you get the figure name to be the same as the toucher? Also, why when I touch the button, a figure pops up but with no legs and arms? Shocked ANd how would you position it?
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
Nasadaws
Delta Corp Moderator


Joined: 27 Mar 2008
Posts: 484
Location: Under you bed Where else?

PostPosted: Fri May 30, 2008 6:11 am    Post subject: Reply with quote

I'm getting the "No Arms" Thing with my script.
_________________
Nasadaws Attack Spammer: Hits 100 Damage with his Ban Hama.
Spammer: Flees.


I R NOE WELDIN ME BAN HAMAR.
Back to top
View user's profile Send private message Send e-mail
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Sat May 31, 2008 2:55 am    Post subject: Reply with quote

Help?
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
Nasadaws
Delta Corp Moderator


Joined: 27 Mar 2008
Posts: 484
Location: Under you bed Where else?

PostPosted: Sat May 31, 2008 8:23 am    Post subject: Reply with quote

You need to put the the figure into lighting.

To put it into lighting, You Copy the Model and then paste into lighting.
_________________
Nasadaws Attack Spammer: Hits 100 Damage with his Ban Hama.
Spammer: Flees.


I R NOE WELDIN ME BAN HAMAR.
Back to top
View user's profile Send private message Send e-mail
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Sat May 31, 2008 7:04 pm    Post subject: Reply with quote

So if you put the figure in Lightning it, would be like a weapon giver? Would it put it in workspace or Starterpack which won't work?
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
Nasadaws
Delta Corp Moderator


Joined: 27 Mar 2008
Posts: 484
Location: Under you bed Where else?

PostPosted: Sat May 31, 2008 7:11 pm    Post subject: Reply with quote

Putting it into workspace seems to not copy a figures arms, Just try to put it in and try then.
_________________
Nasadaws Attack Spammer: Hits 100 Damage with his Ban Hama.
Spammer: Flees.


I R NOE WELDIN ME BAN HAMAR.
Back to top
View user's profile Send private message Send e-mail
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Sat May 31, 2008 11:14 pm    Post subject: Reply with quote

Ok Very Happy
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!