Announcement system bug

Hello! I have an issue with my announcement script. This script is used to send messages to the server like what gamemode has spawned. The issue is, the animations and the announcement frame/imagelabel will not appear no matter what i do. It was working 2 days ago and i havent changed any of the code when i made an update to add a timer.
Code:

local TS = game:GetService("TweenService")
local broadcast = game.StarterGui.Announce.Frame
broadcast.Visible = true
game.ReplicatedStorage.Announce.OnClientEvent:Connect(function(announcement)
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {ImageTransparency = 0}):Play()
	broadcast.ImageLabel.background.Text = announcement
	broadcast.ImageLabel.background.main.Text = announcement
	wait(0.1)
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
	wait(0.3)
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Rotation = -2}):Play()
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Position = UDim2.new(-0.07, 0,-0.157, 0)}):Play()
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Size = UDim2.new(0, 570,0, 92)}):Play()
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {Rotation = -2}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {Rotation = -2}):Play()
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {TextSize = 20}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {TextSize = 20}):Play()
	wait(1)
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Rotation = 0}):Play()
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {Rotation = 0}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {Rotation = 0}):Play()
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Size = UDim2.new(0,555,0,74)}):Play()
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {TextSize = 14}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {TextSize = 14}):Play()
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {Position = UDim2.new(-0.039, 0,-0.157, 0)}):Play()
	wait(0.5)
	TS:Create(broadcast.ImageLabel, TweenInfo.new(0.2), {ImageTransparency = 1}):Play()
	TS:Create(broadcast.ImageLabel.background, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
	TS:Create(broadcast.ImageLabel.background.main, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
end)

You’re changing the graphical user interface inside of StarterGui, not the client’s PlayerGui. StarterGui is a service that holds ScreenGuis that will be copied to the Players’ PlayerGuis.

If you place this script (LocalScript) directly under the ScreenGui, you can access the GUI as script.Parent. If the script is not even a descendant of it, you’ll need to access the Players.LocalPlayer’s PlayerGui, and get the ScreenGui from there.

1 Like

Ok thank you so much, it worked!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.