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

Gore Dismemberment script wont blow back?

Asked by 2 years ago
Edited 2 years ago

Im kinda refurbishing an old gore script and im making so if you get shot your body part gets sent flying, i had to learn linear velocity for this so it will definitely be bad

Btw the script is acheived using special character models with an attatchment in their left and right arms

edit : Also i dont get any errors in studio for some reason

local bullet = script.Parent
local attackerTag = bullet.Attacker.Value

bullet.Touched:Connect(function(hit)
    local char = hit.Parent
    local isHumanoid = char:FindFirstChild("Humanoid")

    local Force = Instance.new("LinearVelocity")
    Force.MaxForce = 1000
    Force.RelativeTo.Value = "Attatchment"

    hit.Parent = game.Workspace
    hit.CanCollide = true

    if hit.Name == "Left Arm" then
        char.Torso["Left Shoulder"]:Destroy()
    elseif hit.Name == "Right Arm" then
        char.Torso["Right Shoulder"]:Destroy()
    end







    if isHumanoid and char.Name ~= attackerTag then
        isHumanoid:TakeDamage(100)
    end

    Force.Parent = hit.BlowSite
    Force.Attachment0 = Force.Parent

    Force.VectorVelocity.Y = 1000
    Force.VectorVelocity.Z = 800
    wait(0.2)
    Force.VectorVelocity.Y = 0
    Force.VectorVelocity.Z = 0

    print("Blow-Back Successfull")
end)

1 answer

Log in to vote
0
Answered by
ultrabug 306 Moderation Voter
2 years ago

I don't know if this will fix the whole thing, but 1 problem I see is that you can't assign to RelativeTo.Value. That value is just the number value of the enum for ActuatorRelativeTo. Instead you can do RelativeTo = 0 or RelativeTo = Enum.ActuatorRelativeTo.Attachment0. Lmk if changing that fixes anything, if not I'll take a more detailed look at it.

0
Honestly i'd say it worked a little too good, it instead flies out of the users hand. Black_Magic2533 104 — 2y
0
lol, well I guess you can just tune it from there ultrabug 306 — 2y
Ad

Answer this question