Trying to make a throwable object

I’ve been stuck on the same problem for 30 minutes, I keep getting the player instead of the mouse.

I’ve used the :GetMouse() method but it also doesn’t work. (using RemoteEvents from a client script)

Is there a solution for this?

Server:

wait(0.1)

local ss = game:GetService("ServerStorage")
local Jeep = ss:WaitForChild("Jeep")

--local db = false
local tool = script.Parent
local event = tool.ThrowObject

local velocity = 145

event.OnServerEvent:Connect(function(mousePos)
	local clone = Jeep:Clone()
	local Script = script.JeepDebrisScript:Clone()
	Script.Parent = clone
	Script.Enabled = true
	
	clone.Parent = workspace.debris
	clone.CFrame = CFrame.lookAt(clone.Position, clone.Position, clone.Position)
	clone.AssemblyLinearVelocity = Vector3.new(clone.CFrame.LookVector * velocity,10,clone.CFrame.LookVector * velocity) 
	
	game:GetService("Debris"):AddItem(clone, 15)
end)

Client:

wait(0.1)

local player = game.Players.LocalPlayer
local plrMouse = player:GetMouse()

local tool = script.Parent
local event = tool.ThrowObject

tool.Activated:Connect(function()
	event:FireServer(plrMouse)
end)

Using :GetMouse() will return an instance, you need to get the CFrame of the mouse by using the Hit property.

The error I get is this:

Hit is not a valid member of Player “Players.TheREALAstonRich”

Its the same thing when I Add .Position to it

Send me the line with the error.

You use ApplyImpulse, not Directly Change the AssemblyLinearVelocity

Also, you are getting the Hit Directly from the Player instead of the Mouse, its Mouse.Hit.Position

Server: Line 17

I’ve changed the script just abit

local ss = game:GetService("ServerStorage")
local Jeep = ss:WaitForChild("Jeep")

--local db = false
local tool = script.Parent
local event = tool.ThrowObject

local velocity = 145

event.OnServerEvent:Connect(function(mousePos)
	local clone = Jeep:Clone()
	local Script = script.JeepDebrisScript:Clone()
	Script.Parent = clone
	Script.Enabled = true
	
	clone.Parent = workspace.debris
 -->	clone.CFrame = CFrame.lookAt(clone.Position, mousePos.Hit.Position, clone.Position)
	clone.AssemblyLinearVelocity = Vector3.new(clone.CFrame.LookVector * velocity,10,clone.CFrame.LookVector * velocity) 
	
	game:GetService("Debris"):AddItem(clone, 15)
end)