So i tried editing a grip to motor6d script, and as you can guess, I did not succeed. I would be happy if you helped me with this.
This is the original script.
local motorName = “Handle” – Change this to the target Motor6D name you want in the Right Arm/RightHand.
– variables
local player
local character
local humanoid
local isR15
local rightHand
– stuff
do
script.Parent.Equipped:connect(function()
if player == nil then
player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
end
if character == nil or character.Parent == nil then
character = script.Parent.Parent
humanoid = character.Humanoid
isR15 = humanoid.RigType == Enum.HumanoidRigType.R15
rightHand = isR15 and character:WaitForChild(“RightHand”) or character:WaitForChild(“Right Arm”)
end
local getWeld = rightHand:WaitForChild(“RightGrip”)
local motor = Instance.new(“Motor6D”)
motor.Name = motorName
motor.Part0 = getWeld.Part0
motor.Part1 = getWeld.Part1
–motor.C0 = getWeld.C0
–motor.C1 = getWeld.C1
getWeld:Destroy()
motor.Parent = rightHand
end)
end
This is the edited version.
local motorName = “Handle” – Change this to the target Motor6D name you want in the Right Arm/RightHand.
And this is what happened.
Idk wat to do. I suck at scripting pls helpppp
changed any of the code below. –
– variables
local player
local character
local humanoid
local isR15
local rightHand
– stuff
do
script.Parent.Equipped:connect(function()
if player == nil then
player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
end
if character == nil or character.Parent == nil then
character = script.Parent.Parent
humanoid = character.Humanoid
isR15 = humanoid.RigType == Enum.HumanoidRigType.R15
rightHand = isR15 and character:WaitForChild(“Torso”) or character:WaitForChild(“Upper Torso”)
end
local getWeld = rightHand:WaitForChild(“RightGrip”)
local motor = Instance.new(“Motor6D”)
motor.Name = motorName
motor.Part0 = getWeld.Part0
motor.Part1 = getWeld.Part1
–motor.C0 = getWeld.C0
–motor.C1 = getWeld.C1
getWeld:Destroy()
motor.Parent = rightHand
end)
end