Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a item appear in a players hand without a tool?

Hey there! I've recently been trying to make a fighting game, and we have our models done. I know how to make a combat system with tools, but we would rather not use them. I'm trying to figure out how to make the object appear in the players right hand (we are using R6). Here is my rough idea of how it could be done.

game.Players.PlayerAdded:Connect(function(plr)
	
	plr.CharacterAppearanceLoaded:Connect(function(char)
		
		local ham = game.ReplicatedStorage.Weapons.Hammer:Clone()
		ham.Parent = char
		
		ham:MoveTo(char["Right Arm"].Position)
		local weld = Instance.new("WeldConstraint",char["Right Arm"])
		weld.Part0 = ham.Rod
		weld.Part1=char["Right Arm"]
		
	end)
	
end)

This doesn't work and the hammer appears over the players arm. Thanks for reading!

1 answer

Huh. turns out that MoveTo() will try to avoid any other parts. SetPrimaryPartCFrame worked though

This discussion is preserved as it was. New answers, comments, and votes are closed.