I am trying to use the mouse in a server script and I am using a remote event to get the mouse but it keeps saying that it is a nil value
-- (Part of) Server Script
local RS = game:GetService("ReplicatedStorage")
local getPlayerMouse = RS:WaitForChild("GetPlayerMouse")
Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
mouse = getPlayerMouse:FireClient(player)
end)
. . .
mouse.KeyDown:Connect(function(key)
if key == "q" then
cancelPlacement()
end
end)
-- Local script
local RS = game:GetService("ReplicatedStorage")
local remote = RS:WaitForChild("GetPlayerMouse")
remote.OnClientEvent:Connect(function()
local plr = game:GetService("Players").LocalPlayer
local mouse = plr:GetMouse()
return mouse
end)

1 comment
EYYYYYYY NICE EXPLAINING DOOBUS