I need a way to send/receive the Mouse.hit property of the PlayerMouse to the server for filtering enabled purposes. I have tried before by using InvokeClient in a RemoteFunction to return the mouse.Hit but it returned nil. Here is what I did (I KNOW THERE ARE TYPOS I WROTE THIS UP ON SPOT AS AN EXAMPLE)
----Using InvokeClient-----
CLIENT
RF = game.ReplicatedStorage.Remotes.GetMousePosition
RF.OnClientInvoke:connect(function()
return(game.Players.LocalPlayer:GetMouse().Hit)
end)
SERVER
local GunRemote = game.ReplicatedStorage.Remotes.GunHandler
GunRemote.OnServerEvent:connect(function(plr, Action)
if Action == "Shoot" then
local mousehit = game.ReplicatedStorage.GetMousePosition:InvokeClient(plr)
-- then make the project and stuff
end)
I really need help please if you know how to do this/fix what I did then please reply.

1 comment
Thanks so much, I got it to work!