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

Whats wrong with this script?

Asked by 10 years ago

I was making a dragon shoot fire, and this script wouldnt work.

--Made by BreBreGaming




 local sp=script.Parent

 local debounce=true


 function burn(hit)
    if hit and hit.parent and hit.parent.name~="Toothless" and hit.name~="handle" and hit.name~="Effect" and debounce then
        debounce=false
        local humanoid=hit.parent:findfirstchild("humanoid")
        if humanoid then
            Humanoid=takedamage(23)
            end
        local fire=sp:findfirstchild('fire')
        if fire then
            fire.enabled=false
        end
        sp.anchored=true
            wait(3)
        sp:destroy()
    end
 end

 sp.Touched:connect(burn)
0
Sorry, I don't know how to make it look like a script :/ BreBreGaming 10 — 10y
0
Highlight it, then click the "Lua" button Tempestatem 884 — 10y
0
Thanks, i never knew how to do that XD BreBreGaming 10 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

Here's a script that I made a while back..

--Made by Capinbuilda



local sp=script.Parent


local head=sp:WaitForChild("Head")
local fireballscript=sp:WaitForChild("FireballScript")


function breathefire()
    local fireball=Instance.new("Part")
    fireball.Transparency=1
    fireball.Name="FireEffect"
    fireball.BrickColor=BrickColor.new("Bright orange")
    fireball.Shape="Ball"
    fireball.Size=Vector3.new(1,1,1)
    fireball.CanCollide=false
    fireball.CFrame=head.CFrame
    fireball.Velocity=head.CFrame.lookVector*50
    fireball.TopSurface=("Smooth")
    fireball.BottomSurface=("Smooth")

    local fire=Instance.new("Fire")

    local firescript=fireballscript:clone()
    firescript.Parent=fireball
    firescript.Disabled=false

    fireball.Parent=game.Workspace
end


while true do
    wait(3)
    breathefire()
end

Name that script "DragonMainScript".. Then, insert this script under the name "FireballScript"..

--Made by Capinbuilda


local sp=script.Parent


local debounce=true

function burn(hit)
    if hit and hit.Parent and hit.Parent.Name~="Toothless" and hit.Name~="Handle" and hit.Name~="FireEffect" then
        debounce=false
        local humanoid=hit.Parent:FindFirstChild("Humanoid")
        if humanoid then
            humanoid:TakeDamage(99)
        end
        local fire=sp:FindFirstChild("Fire")
        if fire then
            fire.Enable
        end
        sp=Anchored=true
        wait(3)
        sp:destroy()
    end
end


sp.Touched:connect(burn)
0
Didn't work :( BreBreGaming 10 — 10y
0
Hmm.. let me go over it. SchonATL 15 — 10y
Ad

Answer this question