Remote event not being received by client

Hi all,
So I have recently made a capture point system for my game, when I test this on my development game it works perfectly with no flaws, however when I copy and paste the system from this game into another it stops working for some reason.
After doing some print debugging I have discovered that my remote event is not being received by the client which is why my UI is not updating.
I do not understand though why this works flawlessly on one game but breaks in another. If anyone is able to help me find the solution to this I would be grateful.

Solutions I have already tried:
-Disabling all other scripts in my game to ensure they are not clashing with my new script
-Using FindFirstChild() and WaitForChild()
-Copying and pasting the raid system again into the game
-Print debugging (see below)

My code:

SERVER
local UpdateUIEvent = Instance.new("RemoteEvent",game.ReplicatedStorage) -- Create UI Remote
UpdateUIEvent.Name = 'RaidUI'

	if point.status >= 1 and point.owner ~=1 then -- Captures to friendly
					print('capped') -- Prints
					point.owner = 1
					point.term:FindFirstChild('Sign').Handles.Color3 = FriendlyTeam.TeamColor.Color
					point.display.BackgroundColor3 = Color3.fromRGB(40,50,32)
					
					UpdateUIEvent:FireAllClients('Captured', point.term.Parent.Name,FriendlyTeam.Name,1) -- Fire clients when a term is capped
					print('client fired') -- Prints
CLIENT
local UIEvent = game.ReplicatedStorage:WaitForChild('RaidUI')


UIEvent.OnClientEvent:Connect(function(action,Terminal,Team,TermStatus)
	print('remote recieved') -- Does not print
	if action == 'Captured' then
		print('cap recieved') -- Does not print
		Notify(Team..' have captured terminal '.. Terminal)
		for _,v in pairs(BG.Terms:GetChildren())do
			if v.Name == Terminal then
				if TermStatus == 1 then v.BackgroundColor3 = FriCol 
				elseif TermStatus == -1 then v.BackgroundColor3 = Hoscol end
			end
		end

Where are both scripts located?

Server script is in ServerScriptService in a folder
Local script is in PlayerGui
image

in the local, you put findfirstchild, have you tried waitforchild in line 1 of the localscript as well?

Yes I have tried using WaitForChild() in the local script before and it didnt work

A bit confused, why is there a “1” at the end?

That is one of the values I am sending to the client using the remote event

use

 :WaitForChild("RaidUI",math.huge)

note this will yield the whole script till raidui is found

1 Like

Ah yes, it will continue waiting again and again until it’s ready, the wait has a max time, right?

Just tried that and it didnt work, I am not getting any yield warnings in the console however

My script now looks like this:
image
the print is printing though which tells me that it is able to find the event but somehow it is not recieving anything when the server fires it

you put in

FindFirstChild('RaidUI',math.huge)

instead of

WaitForChild('RaidUI',math,huge)

no, FindFirstChild, second parameter of FindFirstChild is bool was found so no…
well, why are you anyways creating a remote event @topdog_alpha , this is bad practice if you’re not returning to client properly

1 Like

Oops Im a klutz, I just tried that again changing it back to WaitForChild() but it still did not work

Try a simple alternate to remotes, just make a few value instances and get them from the other script if you don’t manage to get this working

I was creating the event in a script for sake of simplicity as I want to install this system into multiple games.
I have tried creating the event manually and putting it in ReplicatedStorage instead of creating it in my script but this has had no effect and the script still does not work.

What I still do not understand though is why this works perfectly in another game but when I copied it into my new game it breaks, this is the second time I have had this issue

have you tried if you fire it only for 1 player instead of all at once?

And did it work?

Maybe the ScreenGUI that parents your LocalScript is disabled?

Just gave that a go, no effect. The conclusion I have arrived at from this is pretty much that the client is not detecting any remote events being sent to it

Nay, the screen GUI is enabled and visible

1 Like

Is the LocalScript in the exact same position as it was in the game that worked? If not, try moving it to the same position in the explorer, such as StarterCharacterScripts. If it is then try it anyway.

1 Like