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

What's wrong with this?

Asked by 8 years ago

I made a script in which a part welds to my torso, but when I press the mouse, I fall off the map like I wouldn't be cancollided.Help?

function pizza(mouse)
    if debounce == false then
        debounce = true
        local x = Instance.new("Part")
            x.Shape = "Ball"
            x.CanCollide = false
            x.Anchored = false
            x.Material = "Plastic"
            x.TopSurface = "Smooth"
            x.BottomSurface = "Smooth"
            x.Transparency = 0.4
            x.Reflectance = 0.1
            x.Parent = Workspace
            x.Size = Vector3.new(350, 350, 350)
            x.BrickColor = BrickColor.new("Steel blue")
            x.Name = "Spec"
            x.CFrame = Player.Character.Torso.CFrame*CFrame.new(0, 30, 0)
        local w1 = Instance.new("Weld", Player.Character)
            w1.Part0 = w1.Parent["Torso"]
            w1.Part1 = x
            w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) *CFrame.new(0, 0, 0)
        wait(2)
    debounce = false
    end
end

1 answer

Log in to vote
0
Answered by
duckwit 1404 Moderation Voter
8 years ago

Attaching huge Part instances to a player's Character, even when collisions for that part are disabled, interferes with the physical simulation and behaviour of the character.

If you want the appearance of a large Part attached to the player without the physical side effects, then weld a small Part that has a large BlockMesh as a descendent.

Ad

Answer this question