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

Why does my attached object to a player fling people off the map?

Asked by 4 years ago

It doesn't collide, nor is it anchored, and when a character walks up to me, they get pushed back at a high velocity, or even off the map entirely.

function weld(p0, p1, p)
    local weld = Instance.new("WeldConstraint")
    weld.Part0 = p0
    weld.Part1 = p1
    weld.Parent = p
end

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local root = character:WaitForChild("Head")

        if root then
            local newPart = Instance.new("Part")
            newPart.Shape = ("Ball")
            newPart.Transparency = 0.7
            newPart.Size = Vector3.new(5.6, 5.6, 5.6)
            newPart.TopSurface = ("Smooth")
            newPart.BottomSurface = ("Smooth")
            newPart.BrickColor = BrickColor.new("Really blue")
            newPart.CanCollide = false
            newPart.CFrame = root.CFrame * CFrame.new(0, -1.5, 0)
            newPart.Parent = workspace

            weld(root, newPart, root)
wait(10)
newPart.Transparency = 1
        end
    end)
end)

0
make sure the velocity is 0,0,0. Fifkee 2017 — 4y
0
Oh okay, thanks! Hwk3rAlt 14 — 4y

Answer this question