Remote Event Firing But Not Recieving

I have a script that fires from the server to the client. The server fires but the client doesn’t pick it up, does anyone know why this is?

Server
ReplicatedStorage.ActivateBlur:FireClient(player, 56)
Client
ReplicatedStorage.ActivateBlur.OnClientEvent:Connect(ChangeBlurSize)

Have you tried debugging the ChangeBlurSize function?

I have absolutely no clue what that is.

Try something like this;

function ChangeBlurSize()
	print("Event was received")
end

if it didn’t print, make sure the remote event is the same on both the client and the server.

I’ve tried that, that’s how I know it’s not receiving.

You have to connect your event to a function if you want to use its data.

Try doing something like this:

ReplicatedStorage.ActivateBlur.OnClientEvent:Connect(function(ChangeBlurSize)
-- code here
end)

I’m confused, the ChangeBlurSize function is only on the client, and I need the size that the server sends over.

Why couldn’t you do it all on the client?

This is not a function like that.
What I did here was, connect the event to an anonymous function so I can use the object that the connection returned.

You can read this article for more info:

Because it’s part of a function that needs to happen in the right order.

As I was editing this, I tried

and now it’s giving me the error of ActivateBlur is not a valid member of ReplicatedStorage "ReplicatedStorage".

Make sure the ActivateBlur is a valid member of ReplicatedStorage.

Try adding this:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ActivateBlur = ReplicatedStorage:WaitForChild("ActivateBlur")

ActivateBlur.OnClientEvent:Connect(function(ChangeBlurSize)
-- code here
end)
1 Like

Ayo, I figured it out, I created a variable for it and it seems to be receiving now.

Edit: @TheRealANDRO you were one step ahead of me!

2 Likes

Try WaitForChild… if it spits out this: infinite yield on game.ReplicatedStorage.ActivateBlur then test in the server and see if it is there while double checking where the remote event is.

Great! You can mark my answer as a solution if you want. That way other people will know it’s solved.