I have been recently trying to figure out how to weld a tool to a player so that it will follow the players animations. I in the end came out with this script but its not working. Anyone know why?
The script is a local script that is inside the tool under starterpack.
Here is the code
local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local character repeat wait()
character = game.Players.LocalPlayer.Character
until character
local rightArm = character:WaitForChild("Right Arm")
local weld = Instance.new("Weld", handle)
weld.Part0 = rightArm
weld.Part1 = handle
weld.C0 = (0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0) = tool.Grip0
weld.C1 = tool.Grip
end

2 comments
It gives the error " expected near end" ?
Sorry, fixed the error