I Need Help With Tools

Note:- this is my first topic on devforum. if you believe this is not on the right category please guide me or possibly provide a link. Thank You For Reading this Post :smiley:

So i have made a Function which simply Adds a Velocity to the Tools handle(Sorry ik im using “.” Operator but the Issue is Different) and rotates it randomly for more realistic throw. the problem is that if this function executes when player is moving, the player will get back his/her tool.

Script:-

function ThrowObject(plr,Object,Power)
	local ObjectExistsInPlayerBackPack = plr.Backpack:FindFirstChild(Object)
	local Humanoid = plr.Character.Humanoid
	if ObjectExistsInPlayerBackPack and Humanoid then
		local PlayerPosition = plr.Character.PrimaryPart.Position
		local LookVector =  plr.Character.PrimaryPart.CFrame.LookVector
		ObjectExistsInPlayerBackPack.Parent = workspace
		ObjectExistsInPlayerBackPack.Handle.Position = Vector3.new(PlayerPosition.X,PlayerPosition.Y+5,PlayerPosition.Z)
		ObjectExistsInPlayerBackPack.Handle.Rotation = Vector3.new(math.random(1,90),math.random(1,90),math.random(1,90))
		ObjectExistsInPlayerBackPack.Handle.AssemblyLinearVelocity = LookVector * Power
	else
		warn("No Tool or Humanoid")
	end
end

So this tool is throwing something and when you move the tool comes back right?Did you tried to make the player not being able to move change the WalkSpeed to 0 when the player throws the tool?

Well its throwing the tool itself. i was not liking the orignal backspace throw so thought of this

Okay but try to make player not being able to move for some seconds until the throwing ends i think it can work

Thank You Its Working Now. Marking your Earlier Post as Solution. I Was just to Dumb to think about that. :+1:t2: