I enabled Filtering Enabled so I'm adding RemoteEvents and such.
I added a function in my local script so that when I click, it fires the server. I then added the mouse as an argument in the FireServer() function.
player = game.Players.LocalPlayer
mouse = player:GetMouse()
rep = game:GetService('ReplicatedStorage')
reme = rep:WaitForChild('RemoteEvent')
mouse.Button1Down:connect(function()
reme:FireServer(mouse)
end)
I wanted it to print "hello" when it clicks on the baseplate so I wrote this in the server script (The server script's name is "firer")
rep = game:GetService('ReplicatedStorage')
reme = rep:WaitForChild('RemoteEvent')
reme.OnServerEvent:connect(function(player, mouse)
if mouse.Target == workspace.Baseplate then
print 'hello'
end
end)
For whatever reason, it keeps on erroring and saying
15:11:09.355 - ServerScriptService.firer:5: attempt to index local 'mouse' (a nil value)
Sorry if my script doesn't make much sense and the mistake is obvious. This is one of my first times working with FE.
Edit since people say it works: It also works for me when I play, but when I use the client and server test (F7), it says mouse is nil

2 comments
hm. It seems like your code is right...
did you tried on mouse write Mouse = game.player:GetMouse()