Client doesn't receive Event?

Hi folks, i’m trying to communicate a module script through remote events so the server can get the client to update the module. The problem is that the client script doesn’t seem to be receiving anything? I’ve put multiple prints and the server prints all of them but the client never prints any of them. Help is appreciated.

Server:

script.Parent.Handle.ProximityPrompt.Triggered:Connect(function(player)
	print("check1")
	inv = require(game.ReplicatedFirst.Inv)
	print("check2")
	if inv:Getsize(player) < 12 then --i know what i did here shush
		print("check3")
		game.ReplicatedFirst.GiveRemove:FireClient(player,"Furry meat",1,script.Parent)		
		print("check4")
	end
end)

Client:

script.Parent.GiveRemove.OnClientEvent:Connect(function(plr,object,count,tool)
	print("check5")
	local inv = require(game.ReplicatedFirst.Inv)
	inv:give(plr,object,count)
	print("check6")
	tool.RemoteEvent:FireServer()
	print("check7")
end)

Like I said, I think the client isn’t receiving it because it doesn’t even print check 5.

1 Like

Remote Events don’t run in Replicated First, which is when the player loads into the game. Replicated First only replicates once and shouldn’t be used as a constant server-client interaction.

1 Like

So where should I move the event?

It can run in a player’s backpack, in a player gui and a character

Put it in ReplicatedStorage and change the local script to run in any of the environments it runs in (player backpack, starter gui, replicated first etc) and call the event from there. That should work.

1 Like

It worked! Thank you so much! I do think i’ll switch to server sided module handling but this is also useful to me for another project. Once more thank you.

2 Likes

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