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

How to stop a large welded part from making the player turn oddly?

Asked by 5 years ago
Edited 5 years ago

Not sure if this pertains to scripting specifically, but I'm sure there's a way to fix it using Lua. When I attach a large part to the player's Torso, it affects their movement in a negative way, like causing them to turn relative to the large brick instead of the torso. This is a common problem people have, but I still have yet to find an answer to it personally. Is there a fix? Here's the code, if it may help:

game.Players.PlayerAdded:Connect(function(player)

    player.CharacterAdded:Connect(function(char)

        local radius = game.ServerStorage.HomingRadius:Clone()

        radius.Parent = char.HumanoidRootPart

        local w = Instance.new("Weld", radius)

        w.C0 = CFrame.new(0, 1, -10)

        w.Part0 = char.HumanoidRootPart

        w.Part1 = radius

        radius.Anchored = false

        radius.CanCollide = false

      end)

end)

Answer this question