Server RemoteEvent isn’t being fired (or the localscript is not able to listen to the event being fired) The Script is in ServerScriptService, localscript is in a textlabel stored in startergui
Server Script:
local sendText = game.ReplicatedStorage:WaitForChild("SendText")
print("d")
sendText:FireAllClients("test")
LocalScript:
local sendText = game.ReplicatedStorage.SendText
game.ReplicatedStorage.SendText.OnClientEvent:Connect(function()
print("a")
end)
RemoteEvent fires however when I add wait() at any point before the FireAllClients() line.
The server script is probably running before the client starts listening for the event, meaning the client receives it but doesn’t do anything about it. Try adding a task.wait(5) to the start of the server script, or better yet, listen for the PlayerAdded event, then call FireAllClients().