I'm trying to make an announcement script that works with FE, but I'm stuck here. This is in a LocalScript. Any help here? I would greatly appreciate it.
Script below:
player = game:GetService("Players").LocalPlayer guiyes = player:WaitForChild("PlayerGui") replicate = game:GetService("ReplicatedStorage") replicate.FEStuff.AnnoucementChange.OnClientEvent:Connect(function() guiyes.Annoucement.TextLabel.Text = game.Workspace.AnnoucementText.Value end)
You should replace lines 5-7 with:
replicate.FEStuff.AnnouncementChange.OnClientEvent:Connect(function(txt) guiyes.Announcement.TextLabel.Text = txt end)
If you wanna fire the event, you'll have to use FireClient or FireAllClients in a server-sided(normal) script.
Here's how you could go about firing the event:
-- this is your code in a server-sided (normal) script local replicated=game:GetService('ReplicatedStorage') local event = replicated.FEStuff local Text = 'idk xd' -- This will be your text that will be displayed in the announcement -- You can fire the event to one player/client using: event:FireClient(player, Text) -- player is an example of a player in a game -- if you want to fire the event to all players/clients, use FireAllClients event:FireAllClients(Text) -- FireAllClients doesn't need the player argument