Remote event not working on server

The remote fires successfully on the local script but wont print anything on the server script, why is this? Thank you for your help!

-- Local Script (Inside a button):
local Button = script.Parent

local remoteEvent = game.ReplicatedStorage.RemoteEvents.SpawnEvent


Button.MouseButton1Click:Connect(function()
	print("1")
	remoteEvent:FireServer()
	print("8")
end)

-- Script(inside replicated storage): 
local remoteEvent = game.ReplicatedStorage.RemoteEvents.SpawnEvent

remoteEvent.OnServerEvent:Connect(function()
	print("true")
end)

That’s because the script is inside ReplicatedStorage, it won’t run there.

Place the script in ServerScriptService

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.