Hello, I want to make a tool that I can throw. I copied this code from another question, but it doesn’t really work. Once the tool’s parent is workspace, it just teleports a couple of studs in front of me and falls. I want that to happen, but instead of teleporting, it realistically moves to the point.
LinearVelocity properties
Attachment properties
local tool = script.Parent
local UIS = game:GetService("UserInputService")
local Power = 100
local Character
local Equipped = false
tool.Equipped:Connect(function()
Character = tool.Parent
Equipped = true
end)
tool.Unequipped:Connect(function()
Equipped = false
end)
UIS.InputBegan:Connect(function(key, gp)
if gp then return end
if key.KeyCode == Enum.KeyCode.E and Equipped == true then
tool.Parent = workspace
tool.Handle.Position = Character.PrimaryPart.Position + Character.PrimaryPart.CFrame.LookVector * 3
tool.Handle.LinearVelocity.VectorVelocity = Character.PrimaryPart.CFrame.LookVector * Power
end
end)