Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats wrong with this script?

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)

3 comments

0

Sorry, I don't know how to make it look like a script :/

0

Highlight it, then click the "Lua" button

0

Thanks, i never knew how to do that XD

1 answer

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)

2 comments

0

Didn't work :(

0

Hmm.. let me go over it.

This discussion is preserved as it was. New answers, comments, and votes are closed.