I have a ServerScript in the Workspace and a LocalScript in every player’s PlayerGui (StarterGui).
Server Code:
local event = game.ReplicatedStorage.Events.Map
local cards = drawCards() --Gets a variable called "cards" from a function
event:FireAllClients(cards)
print("Event Fired") --PRINTS SUCCESSFULLY
Client Code:
local receive = game.ReplicatedStorage.Events.Map
receive.OnClientEvent:Connect(function(cards)
print("received") --DOESN'T GET PRINTED, SOMEHOW.
end)
“Received” doesn’t show up in the output but “Event Fired” does.
Ignore any typos as Studio is showing 0 syntax errors.
Does the server fire events right at the start of the game? In that case the player might have not loaded yet and doesn’t receive the event because of that