The character is a separate model from the player, so you must use player.Character.
Also, you have to set the clone's CFrame to the character's right hand's CFrame, and then add a WeldConstaint to it.
A WeldConstaint basically sticks a part to the character's right hand.
The Part0 and Part1 properties of a WeldConstraint are the parts you want to weld together.
You must also use the CharacterAdded event as the character gets destroyed when they've reset, including the part and weld.
Here's your fixed script:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local c = script.Parent:Clone()
c.CFrame = character.RightHand.CFrame
c.Parent = character.RightHand
local weld = Instance.new("WeldConstraint")
weld.Part0 = c
weld.Part1 = character.RightHand
weld.Parent = character.RightHand
end)
end)
4 comments
This Is In A Script (Not Local) Inside Of The Object!
You set the parent, to set the position relative to the hand you have to do c:SetPrimaryPartCFrame(player.RightHand.CFrame)
but that's not the error the error is that it says "RightHand" isn't a part of Player
do player.Character.RightHand