I'm making a game and a script is broken. Basically, there's a boss fight and it shoots bugs that damage you when you touch it, but the bugs won't damage you.

function Fly()
	
	local missle = Instance.new("Part")
	missle.Size = Vector3.new(7,8,7)
	missle.CanCollide = false
	missle.Transparency = 1
	local Decal = VineAssets.FlyDecal:clone()
	Decal.Parent = missle
	local Vel = Instance.new("BodyVelocity", missle)
	Vel.MaxForce = Vector3.new(9999999,9999999,9999999)
	Vel.Velocity = Vector3.new(-20,0,0)
	local snd = VineAssets.FlyBuzz:clone()
	snd.Parent = missle
	
	Debris:AddItem(missle,4)
	
	missle.CFrame = CFrame.new(40,100,math.random(-32,32))*CFrame.Angles(0,math.rad(90),0)
	missle.Parent = script.Parent
	missle:SetNetworkOwner(nil)
	snd:Play()
	Damage(missle)
	
end

6 comments

0

Please provide the code for the function Damage. Post all related code to your problem

0

The code provided had nothing to do with damaging the players...

0

also try spelling missile right xD

0

in this case spelling doesn't matter because it was a variable

0

I couldn't post the full script because there's a 10,000 character limit.

0

Where should I put the damage script?