Local Script
local rep = game.ReplicatedStorage local mouseDetection = rep.MouseDetection local player = game.Players.LocalPlayer local mouse = game.Players.LocalPlayer:GetMouse() mouse.Button1Down:Connect(function() mouseDetection:FireSever() end)
Server Script
local rep = game:GetService("ReplicatedStorage") local mouseDetection = rep:WaitForChild("MouseDetection") local canHit = false local db = false local notMoving = false local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouseDetection.OnServerevent:Connect(function(player) canHit = true print(canHit) end)
it gives this error: FireSever is not a valid member of RemoteEvent "ReplicatedStorage.MouseDetection"