Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[SOLVED] Why doesnt this get mouse detection for serverside?

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

0

did you mean OnServerEvent not OnServerevent, not sure if that's the problem

0

alos delete the line 6 and line 7 on Server Script since it's for LocalScripts only

0

nevermind i spelt server wrong i hate my life

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.