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

How do I tween Orientation smoothly with WeldConstraints?

Asked by 6 years ago
Edited 6 years ago

So like I am making an RPG using a kit from Evercyan and tried to make a mob with custom attacks. When I used this code on a mob it just bugs out.

local humanoid = script.Parent.Enemy
local gui = script.Parent.Enemy:WaitForChild('WarningGui')

function tween()
    local tS = game:GetService("TweenService")
    local part = script.Parent.Sword
    local arm = script.Parent["Right Arm"]
    local tweenInfo = TweenInfo.new(0.45, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false)

    local properties = {
        Orientation = Vector3.new(-67.5, -90, -90)
    }

    local armProperties = {
        Orientation = Vector3.new(67.5, 90, 0)
    }

    local reverseProperties = {
        Orientation = Vector3.new(-90, -180, 0)
    }

    local reverseArmProperties = {
        Orientation = Vector3.new(90, 90, 0)
    }

    local createTween = tS:Create(part, tweenInfo, properties)
    local createArmTween = tS:Create(arm, tweenInfo, armProperties)
    createArmTween:Play()
    wait(1)
    local createReverseArmTween = tS:Create(arm, tweenInfo, reverseArmProperties)
    local createReverseTween = tS:Create(part, tweenInfo, reverseProperties)
    createReverseArmTween:Play()
end

while true do
    wait(4.5)
    repeat wait() until script.Parent.isFollowing.Value == true
    gui.Enabled = true
    wait(0.45)
    gui.Enabled = false
    tween()
    script.Parent.Sword.fireDamage.Disabled = false
    wait(0.6)
    script.Parent.Sword.fireDamage.Disabled = true
end
0
with a weld you would change CO or C1 offset User#5423 17 — 6y
0
i am using weld constraint testimonent 30 — 6y
0
You canot change a weld constraint offsets o.o User#5423 17 — 6y
0
so I should change to welds? testimonent 30 — 6y

Answer this question