so i am making a custom inventory script for my game but for some reason when ived weld it and moved it to the players arm is 40 studs or more below
the Image:
i have turned off the inventory core gui and as you now if you have teid to make one humanoid:EquipTools does not move the tool to the players arm and well its just not teleporting to the arm so i would quite like some help
script:
function Equipers.hs(player: Player,Tool: Tool,Mode)
local hum: Humanoid = player.Character.Humanoid
if Mode == "UnEquiped" then
print(Tool.Parent)
hum:UnequipTools(Tool)
Tool.WeldConstraint:Destroy()
elseif Mode == "Equiped" then
print(Tool.Parent)
hum:EquipTool(Tool)
local Arm = player.Character:FindFirstChild("Right Arm")
if not Arm then
local WeldConstartet = Instance.new("WeldConstraint")
WeldConstartet.Parent = Tool
WeldConstartet.Part0 = Tool.Handle
WeldConstartet.Part1 = player.Character.RightHand
Tool:PivotTo(player.Character.RightHand.CFrame)
else
local WeldConstartet = Instance.new("WeldConstraint")
WeldConstartet.Parent = Tool
WeldConstartet.Part0 = Tool.Handle
WeldConstartet.Part1 = player.Character["Right Arm"]
Tool:PivotTo(player.Character["Right Arm"].CFrame)
end
end
end