Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I clone a model onto a character more than once?

Asked by 10 years ago

Example: I want this NVG (http://www.roblox.com/IBH-item?id=132352515) to clone onto my character whenever I touch the giver. A guy told me I need to add in Fire then Spread script into the Head (Giver). It only gives once. How do I make it give more than once? I used this in the Spread script:

function Spread(part)
    check = part:findFirstChild("Fire")
        if check == nil then 
    script.Parent:Clone().Parent = part

        elseif check ~= nil then
    check.Size = check.Size +1000000
    check.Heat = check.Heat  +1000000
    end
end


script.Parent.Parent.Touched:connect(Spread)

3 answers

Log in to vote
1
Answered by
RM0d 305 Moderation Voter
10 years ago

> BEFORE

function Spread(part)
    check = part:findFirstChild("Fire")
        if check == nil then-- if nil create fire
    script.Parent:Clone().Parent = part

        elseif check ~= nil then
    check.Size = check.Size +1000000
    check.Heat = check.Heat  +1000000
    end
end


script.Parent.Parent.Touched:connect(Spread)

> After

function Spread(part)
    check = part:findFirstChild("Fire")
-- REMOVED IF 
    script.Parent:Clone().Parent = part
end


script.Parent.Parent.Touched:connect(Spread)

> any questions comment below... I if helped upvote me please

Ad
Log in to vote
-1
Answered by 10 years ago

Why have the end of the script then put parent.parent?

Log in to vote
-1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

After line 6, put check = check:clone()

Answer this question