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: Pretty simple script fix

Previous Thread :: Next Thread 
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 04:59 AM
Hey. Please can some help me with this script? What this script does is every 1 second makes a clone of me. I was wondering if someone could edit this so that the clones disappear after 10 seconds, because they always lag up the server. Thanks for any help.

FF = "fizzman"
while true do
wait(1)
T = game.Workspace[FF].Torso:clone()
T.Parent = game.Workspace
T.Anchored = true
H = game.Workspace[FF].Head:clone()
H.Anchored = true
H.Parent = game.Workspace
LL = game.Workspace[FF]:FindFirstChild("Left Leg"):clone()
LL.Anchored = true
LL.Parent = game.Workspace
RL = game.Workspace[FF]:FindFirstChild("Right Leg"):clone()
RL.Parent = game.Workspace
RL.Anchored = true
RA = game.Workspace[FF]:FindFirstChild("Right Arm"):clone()
RA.Parent = game.Workspace
RA.Anchored = true
LA = game.Workspace[FF]:FindFirstChild("Left Arm"):clone()
LA.Anchored = true
LA.Parent = game.Workspace
end

Thanks again.
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 05:08 AM
Anyone?
Report Abuse
qwerty1806 is not online. qwerty1806
Joined: 20 Sep 2008
Total Posts: 737
29 Oct 2011 05:12 AM
Make a new script with this in it:

wait(10)
script.Parent:Remove()

Then just make the original script copy it and place it in every clone.
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Oct 2011 05:41 AM
is there any output?
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 06:14 AM
Dunno tested this on SB
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 06:21 AM
local name = "fizzman"
while true do
    wait(1)
    local clone = Instance.new("Model")
    for _, bodyPart in ipairs({"Torso", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm"}) do
        bodyPart = game.Workspace[name][bodyPart]:clone()
        bodyPart.Anchored = true
        bodyPart.Parent = clone
    end
    clone.Parent = game.Workspace
    
    game:GetService("Debris"):AddItem(clone, 10)
end
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 06:21 AM
Whoops:

    local name = "fizzman"
    while true do
        wait(1)
        local clone = Instance.new("Model")
        for _, bodyPart in ipairs({"Torso", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm"}) do
            bodyPart = game.Workspace[name][bodyPart]:clone()
            bodyPart.Anchored = true
            bodyPart.Parent = clone
        end
        clone.Parent = game.Workspace
        
        game:GetService("Debris"):AddItem(clone, 10)
    end
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 07:18 AM
Wow. Thanks. You rock :D
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 12:33 PM
Here's a fixed version, in response to this PM:

> Hey again. TY for this script. As you know, this script creates clones
> of me, and they disappear 1 second later. However, I always get
> catapulted in to the air when I stand still. Can you edit this script
> so that when I stand still the clone doesn't spawn on me? Or so that
> they spawn somewher behind me? Thanks for any help.

    local name = "fizzman"
    local minDist = 10
    while true do
        local clone = Instance.new("Model")
        for _, bodyPartName in ipairs({"Torso", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm"}) do
            local bodyPart = game.Workspace[name][bodyPartName]
            local clonedPart = bodyPart:clone()
            
            --wait till the one we copied has moved
            repeat wait() until (clonedPart.Position - bodyPart.Position).magnitude ​> minDist
            
            clonedPart.Anchored = true
            clonedPart.Parent = clone
        end
        clone.Parent = game.Workspace
    
        game:GetService("Debris"):AddItem(clone, 10)
    end
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 12:56 PM
Doesn't seem to work.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 01:38 PM
As in nothing happens, or it still ends up overlapping?
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 01:47 PM
Nthing happens
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 01:58 PM
Output?
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:01 PM
Ive been testing this on Script Builder
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 02:03 PM
Wait, nevermind, I see a big problem with that one. This ought to work:

    local player = game.Players.fizzman
    local minDist = 10
    while true do
        local clone = Instance.new("Model")
        local character = player.Character
        if character then
            for _, bodyPart in ipairs({"Torso", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm"}) do
                local clonedPart = character[bodyPart]:clone()
                clonedPart.Anchored = true
                clonedPart.Parent = clone
            end
            
            --wait till the original has moved from the one we copied
            repeat wait() until (clone.Torso.Position - character.Torso.Position).magnitude ​> minDist
            clone.Parent = game.Workspace
            
            game:GetService("Debris"):AddItem(clone, 10)
        end
    end
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:05 PM
Thanks. I'll test this one now.
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:12 PM
Nope. Not working. This is what I am saying in the SB:

1. create/p
2. edit/p
3. local player = game.Players.fizzman
local minDist = 10
while true do
local clone = Instance.new("Model")
local character = player.Character
if character then
for _, bodyPart in ipairs({"Torso", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm"}) do
local clonedPart = character[bodyPart]:clone()
clonedPart.Anchored = true
clonedPart.Parent = clone
end

repeat wait() until (clone.Torso.Position - character.Torso.Position).magnitude ​> minDist
clone.Parent = game.Workspace

game:GetService("Debris"):AddItem(clone, 10)
end
end

4. exit/
5. run/p


Is that right?
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 02:13 PM
JUST TEST IT IN PLAY SOLO!
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:13 PM
:D ok
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:17 PM
Nope. Dont work.
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
29 Oct 2011 02:32 PM
Hello?
Report Abuse
hyper900 is not online. hyper900
Joined: 14 May 2009
Total Posts: 873
29 Oct 2011 02:43 PM
p = workspace.YOURNAME
while wait(1) do
p.archivable = true
c = p:Clone()
c.Parent = workspace.
c.Torso.CFrame = c.Torso.CFRame*CFrame.new(0,1,0)
end
Report Abuse
hyper900 is not online. hyper900
Joined: 14 May 2009
Total Posts: 873
29 Oct 2011 02:46 PM
oopz put a dot on the workspace part


p = workspace.YOURNAME
while wait(1) do pcall(function()
p.archivable = true
c = p:Clone()
c.Parent = workspace
c.Torso.CFrame = c.Torso.CFrame*CFrame.new(0,3,0)
end) end


That should be better
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
29 Oct 2011 02:50 PM
Did you get any errors in the output?
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
30 Oct 2011 09:04 AM
@NXTboy
NVM it got it working.
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