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

A damage script in my game is broken and I need help fixing it?

Asked by 5 years ago

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
0
Please provide the code for the function Damage. Post all related code to your problem pidgey 548 — 5y
0
The code provided had nothing to do with damaging the players... FadedJayden_Dev 118 — 5y
0
also try spelling missile right xD HDWC 53 — 5y
0
in this case spelling doesn't matter because it was a variable mudathir2007 157 — 5y
View all comments (2 more)
0
I couldn't post the full script because there's a 10,000 character limit. JellyrollDuck 8 — 5y
0
Where should I put the damage script? JellyrollDuck 8 — 5y

Answer this question