Remote Event only firing inside of Roblox Stuido..?

Hello. Some really weird issue has been happening with my remote event that fires from ServerScriptService into a localscript within a SurfaceGui (within the PlayerGui) adorneed to a specific part. The issue I’m having is the remote event is working perfectly within Studio, but for some odd reason in-game it’s not firing!

IN STUDIO:


image

IN ROBLOX (in-game):

Server Remote Fire:

game.ReplicatedStorage.AdEvent:FireAllClients(PLACEID, title, icon, thumbnail, desc)

print("Should have fired")

Client Received Remote Fired:

local Gameid = nil -- keep nil

game.ReplicatedStorage.AdEvent.OnClientEvent:Connect(function(gameid, title, icon, thumbnail, desc)
	Gameid = gameid
	script.Parent.MainFrame.GameInfo.Title.Text = title
	script.Parent.MainFrame.GameInfo.Icon.Image = icon
	script.Parent.MainFrame.Thumbnail.Image = thumbnail
	script.Parent.MainFrame.GameInfo.Desc.Text = desc
	print(gameid.." ", title.." ", icon.." ", thumbnail.." ", desc.." ")
end)

Is the event firing before the player gets a chance to listen to it, and are you firing it every time a player joins the game:

Players.PlayerAdded:Connect(function(p)
  ReplicatedStorage.AdEvent:FireClient(p, ...)
end)
1 Like

The server is probably executing the remote before the player (and their script) loads in the game, so it never receives the call.

You could try firing the remote each time the player joins the game.

game.Players.PlayerAdded:Connect(function(player)
    adEvent:FireClient(player, ...) --//put in your arguments
end)

Ha! Can’t believe I didn’t think of that! It works now, thank you both very much