Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Get Player's Mouse in a Server Script?

Asked by 6 years ago

I wanna get the players mouse in a local script in an fe game, usually i have my friend show me but he won't be able to for a while so i'll try to ask here

local function onEventFired(player, mousehit)

hes able to use this and have it work but when i try replicating it this way mousehit comes out as nil and I'm not sure why

2 answers

Log in to vote
0
Answered by 6 years ago

You cannot get the mouse in a server script if I'm not mistaken :/ If you want to do something with it in the srever I recommend remote firing that action, not the mouse.

Ad
Log in to vote
0
Answered by 6 years ago

So i found out how to do it, basically the game is fe sorry for not mentioning it

Event:FireServer(mouse.Hit)
onEventFired(player,mousehit)

this is how i was able to get the mouses location using a server script but it only works using remote events

Answer this question