Remote Function firing on client, yet not being received by the server

So, I’m making a messaging system. On the client, when the FocusLost event fires on a TextBox, it fires a RemoteEvent in ReplicatedStorage. There’s also a a server script in ReplicatedStorage which handles the OnServerEvent event.

Whenever it fires on the client (which I know it does, I debugged with prints), it’s supposed to print “received” on the server, yet it does not. Could I get some help?

Hierarchy:
image

Send script. We aren’t able to help without any code.

Oh yeah, forgot about that.

Server script:

local msg = script.Parent.GUIAssets.NewMessage

function ProcessContents(x, y)
	local chat = game:GetService("Chat")
	local result = chat:FilterStringForBroadcast(x, y)
	return result
end

function Receive(plr, contents)
	local newMsg = msg:Clone()
	newMsg.Contents = ProcessContents(contents, plr)
	newMsg.Username = plr.Name
end

script.Parent.send.OnServerEvent:Connect(function(plr, contents)
	print("received")
	Receive()
end)

Local script:

local event = game.ReplicatedStorage.send
local input = script.Parent.MainArea.UserInput.Input

function focusLost(e)
	print("a")
	if e then
		print("b")
		event:FireServer(input.Text)
		print("c")
	end
end

input.FocusLost:Connect(focusLost)

Scripts dont run in ReplicatedStorage, put it in ServerScriptService

2 Likes

Wait, thats all??

I feel so dumb now. Thanks ig.

1 Like