Okay, so today I ran into a weird issue where a local script fires a remote event
and the server should receive it with the OnServerEvent function but for some reason, it doesn’t and it is such a simple thing in my head what am I doing wrong can someone help?
Sender (LocalScript)
local RepStorage = game:GetService("ReplicatedStorage")
local HasCompletedQuests =RepStorage.Events:WaitForChild("HasCompletedQuests")
local function HandleClick()
ClickSfx:Play()
print("Click Detected")
HasCompletedQuests:FireServer(0)
end
script.Parent.MouseButton1Down:Connect(HandleClick)
Receiver (Server Module Script)
local SSS = game:GetService("ServerScriptService")
local RepStorage = game:GetService("ReplicatedStorage")
local HasCompletedQuests = RepStorage.Events:WaitForChild("HasCompletedQuests")
local module = {}
function module.HasQuestBeenCompleted(playerr, value)
print("Test")
end
HasCompletedQuests.OnServerEvent:Connect(function(plr, val)
print("Remote Received Server")
module.HasQuestBeenCompleted(plr, val)
end)
return module
Could anyone have a look and help me out, local script prints that the click is detected but the server script doesn’t print anything