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:
01 | function Spread(part) |
02 | check = part:findFirstChild( "Fire" ) |
03 | if check = = nil then |
04 | script.Parent:Clone().Parent = part |
05 |
06 | elseif check ~ = nil then |
07 | check.Size = check.Size + 1000000 |
08 | check.Heat = check.Heat + 1000000 |
09 | end |
10 | end |
11 |
12 |
13 | script.Parent.Parent.Touched:connect(Spread) |
> BEFORE
01 | function Spread(part) |
02 | check = part:findFirstChild( "Fire" ) |
03 | if check = = nil then -- if nil create fire |
04 | script.Parent:Clone().Parent = part |
05 |
06 | elseif check ~ = nil then |
07 | check.Size = check.Size + 1000000 |
08 | check.Heat = check.Heat + 1000000 |
09 | end |
10 | end |
11 |
12 |
13 | script.Parent.Parent.Touched:connect(Spread) |
> After
1 | function Spread(part) |
2 | check = part:findFirstChild( "Fire" ) |
3 | -- REMOVED IF |
4 | script.Parent:Clone().Parent = part |
5 | end |
6 |
7 |
8 | script.Parent.Parent.Touched:connect(Spread) |
> any questions comment below... I if helped upvote me please