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"

3 comments
did you mean OnServerEvent not OnServerevent, not sure if that's the problem
alos delete the line 6 and line 7 on Server Script since it's for LocalScripts only
nevermind i spelt server wrong i hate my life