#I don't know what happens please help me(Weld problems)

1 messages · Page 1 of 1 (latest)

quasi tree
#

Well as in the video it seems like player get effect by dummy's physics please help make the player ignores it

local Humanoid = script.Parent:WaitForChild("Humanoid")
local RS = game:GetService("ReplicatedStorage")
local remoteEvent = RS.RemoteEvent.RobotHitEvent
local bot = script.Parent

local function Carry(player)
    for i,v in pairs(bot:GetChildren()) do
        if v:IsA("BasePart") then
            v.Massless = true
            v.CanCollide = false
        end
    end
    bot.HumanoidRootPart.CFrame = player.HumanoidRootPart.CFrame * CFrame.new(0, 0, -1)
    local Weld = Instance.new("Weld", player.HumanoidRootPart)
    Weld.C1 = CFrame.new(0, 0, -1)
    Weld.Part0 = player.HumanoidRootPart
    Weld.Part1 = bot.HumanoidRootPart
    Weld.Name = "CarryWeld"
end



remoteEvent.OnServerEvent:Connect(function(player, hit)
    if hit == script.Parent then
        for _, part in pairs(script.Parent:GetDescendants()) do
            if part:IsA("BasePart") then
                part.Massless = true
            end
        end
        for index,joint in pairs(script.Parent:GetDescendants()) do
            if joint:IsA("Motor6D") and joint.Parent ~= bot.HumanoidRootPart then
                local socket = Instance.new("BallSocketConstraint")
                local a1 = Instance.new("Attachment")
                local a2 = Instance.new("Attachment")
                a1.Parent = joint.Part0
                a2.Parent = joint.Part1
                socket.Parent = joint.Parent
                socket.Attachment0 = a1
                socket.Attachment1 = a2
                a1.CFrame = joint.C0
                a2.CFrame = joint.C1
                socket.LimitsEnabled = true
                socket.TwistLimitsEnabled = true
                joint:Destroy()
            end
        end
        Carry(player.Character)
    end
end)```
quasi tree
#

I figured it out

#

Well