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

How do I make the summon not move the player?

Asked by 2 years ago

My animation for some reason is pushing the user?

This is the script for the summon

model.Parent = char

        model:PivotTo(char.PrimaryPart.CFrame)

        for i, v in pairs(model:GetDescendants()) do
            if v:IsA("MeshPart") or v:IsA("Part") then
                v.Transparency = 1
            end
        end

        local w = Instance.new("Weld", model)
        w.Name = "Weld"
        w.Part0 = char:FindFirstChild("HumanoidRootPart")
        w.Part1 = model:FindFirstChild("HumanoidRootPart")
        w.C1 = CFrame.new(0,0,0)

        local track = model:FindFirstChildOfClass("Humanoid").Animator:LoadAnimation(Stands.Idle)
        track:Play()


        for i, v in pairs(model:GetDescendants()) do
            if v:IsA("MeshPart") or v:IsA("Part") then
                if v.Name ~= "HumanoidRootPart" then
                    local t = game:GetService("TweenService"):Create(v, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out), {Transparency = 0})
                    t:Play()
                end
            end
        end

        local t = game:GetService("TweenService"):Create(model:FindFirstChild("Weld"), TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out), {C1 = CFrame.new(2.5,-1,-2)})
        t:Play()

There are no errors

0
Pretty sure its the collision, as puppynniko said, but if not, I would assume it be something to do with the weld. I'm not too familiar with welds but have noticed my models moving while welded so I stick to weld constraints. BulletproofVast 1033 — 2y

1 answer

Log in to vote
1
Answered by
Puppynniko 1059 Moderation Voter
2 years ago

Make the stand's Can collide to false

        for i, v in pairs(model:GetDescendants()) do
            if v:IsA("BasePart") then
                v.CanCollide = false
                if v.Name ~= "HumanoidRootPart" then
                    local t = game:GetService("TweenService"):Create(v, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out), {Transparency = 0})
                    t:Play()
                end
            end
        end
0
It didn't work, I don't think the CanCollide matters Kingu_Criminal 205 — 2y
0
why wouldn't it? Puppynniko 1059 — 2y
Ad

Answer this question