Copy the position of HumanoidRootPart but move it a little bit forward to where you're facing

Hello, I’m making a tool drop system for my game. I want to place the dropped tool on the player’s humanoidrootpart but move it slightly forward to where your character is facing so I won’t pick it up again. This a script from the remote event.

local function Drop(player, selectedweapon, position)

local gunmodel = game.ReplicatedStorage.GunModels[selectedweapon.Name]:Clone()
	gunmodel.Position = position -- position of the player's humanoid root part
	gunmodel.Parent = game.Workspace
end

DropWeapon.OnServerEvent:Connect(Drop)

Please help. Thank you!

local STUDS_FAR = 10
local function Drop(player, selectedweapon, position)
    local gunmodel = game.ReplicatedStorage.GunModels[selectedweapon.Name]:Clone()
	gunmodel.Position = position + player.Character.HumanoidRootPart.CFrame.LookVector * STUDS_FAR
	gunmodel.Parent = game.Workspace
end
DropWeapon.OnServerEvent:Connect(Drop)

should work, just change the "STUDS_FAR" to how far the item should be

1 Like

Yep! Working fine now! Tysm! :smiley:

1 Like