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

Weld a part with a body mover?

Asked by 4 years ago

Is there anyway to weld a part to the player with a body mover without it affecting the player, i only want it to affect the part that the body mover is in, I'm using a BodyGyro btw

code

local char = script.Parent
local arm = char:WaitForChild("Right Arm"):Clone()
local w = Instance.new("WeldConstraint")
w.Part0 = arm
w.Part1 = char:WaitForChild("Head")
w.Parent = char
arm.Parent = workspace

local m = game.Players.LocalPlayer:GetMouse()
local bg = Instance.new("BodyGyro",arm)
bg.MaxTorque = Vector3.new(1e9,1e9,1e9) 

while wait() do 
bg.CFrame = CFrame.new(arm.Position,m.Hit.p) 
end

I'm basically cloning the player's right arm and putting a bodygryo inside but it's affecting the player? Do i have to switch way's to point the part to the mouse?

Answer this question