I am instancing a part in a server script and I need it to face the mouse's position which means I need the mouse's position everytime it moves.
if input.KeyCode == Enum.KeyCode.Z and debounces.move1 == true and gpe == false and char.Enabled.Value == true then
debounces.move1 = false
local test = {"Trident", mouse.Hit}
iceEvent:FireServer(test)
wait(1)
test[2] = mouse.Hit
iceEvent:FireServer(test)
wait(5)
debounces.move1 = true
That is the code I have so far but I don't think that is the best way to do something like this. I currently only learned remote events in filtering enabled and attempted to learn remote functions but remote functions don't seem to be able to provice a solution. Please help.

2 comments
Is this the full script? Are you using a mouse.Move event?
No, I didn't want to fire the event to the server that many times I was trying to think of another way