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

How do I make the primary part's cframe of a tool to the humanoid root part?

In my game I have an inventory system and for the drop system I'm trying to make it when u press drop it drops the tool underneath the player. It currently works but spawns where it was picked up instead of underneath the player. How do I fix this to change the frame to hrp to get it to drop underneath the player?

	elseif(dropped:IsA("Tool")) then
		dropped.Tool.CFrame = CFrame.new(player.Character:WaitForChild("HumanoidRootPart").CFrame * (player.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0 ))	

1 answer

Your doing CFrame.new on a already existing CFrame. Try doing this:

elseif(dropped:IsA("Tool")) then
dropped.Tool.CFrame=player.Character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(player.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0 ))

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