Script not showing UI for others

None of my scripts are showing for other players inside the server, even though they are fired of :FireAllClients, via the server script.

All my remote events:
image

Local Script:

local RS = game:WaitForChild("ReplicatedStorage")
local plr = game.Players.LocalPlayer
local player = game:GetService("Players")

local canbeused = true


local streamaraiangrande = {"Looks like the host / co-host forgot to put a message here, haha! Lucky for you already ahead of you.","It appears that the host / co-host forgot a message here, woopsies!","It appears that the host / co-host forgot a message here, woopsies!"}

-- buttons function of UI lol xd xd xdr wararwarrar

if plr:HasAppearanceLoaded() then
	script.Parent.LeftTopPanel.username.Text = plr.Name
	script.Parent.LeftTopPanel.rank.Text = plr:GetRoleInGroup(8176838)
else
	script.Parent.LeftTopPanel.username.Text = "Loading!"
	script.Parent.LeftTopPanel.rank.Text = "It appears that we havent loaded yet!"
end



script.Parent.PanelMain.Gray_Frame.Session.MouseButton1Click:Connect(function()
	script.Parent.PanelMain.Session_Frame.Visible = true

	script.Parent.PanelMain.Session_Frame:TweenSize(UDim2.new(0, 370,0, 254),"Out","Bounce")

end)

-- host
script.Parent.PanelMain.Session_Frame.Gray_Frame.Host.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.T_Remotes.Session_Remotes.GetPlayer:FireServer(plr)
	local moderator = plr
	
	script.Parent.LeftTopPanel.Title.Host.Text = "Session Host: " .. string.lower(plr.Name)
	script.Parent.PanelMain.Session_Frame.Gray_Frame.C_Host.Text = "Session Host: " .. string.lower(plr.Name)
	script.Parent.LeftTopPanel.ImageLabel.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. plr.UserId .."&width=420&height=420&format=png"
end)




-- cohost
script.Parent.PanelMain.Session_Frame.Gray_Frame.Co_Host.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.T_Remotes.Session_Remotes.GetPlayer:FireServer(plr)
	local moderator = plr
	
	script.Parent.LeftTopPanel.Title.Cohost.Text = "Session Co-Host: " .. string.lower(plr.Name)
	script.Parent.PanelMain.Session_Frame.Gray_Frame.C_C.Text = "Session Co-Host: " .. string.lower(plr.Name)
end)


local status = true
local statusext = true

script.Parent.PanelMain.Session_Frame.Gray_Frame.Send_Announcement.MouseButton1Click:Connect(function()
	if status == true then
		game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive:FireServer(script.Parent.PanelMain.Session_Frame.Gray_Frame.Announcement_Text.Text)
		status = false
		wait(15)
		status = true
	else
		warn("arianagrande error")
	end
end)


if statusext == true then
	game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive.aaasdada:FireServer(script.Parent.PanelMain.Session_Frame.Gray_Frame.Send_Announcement.Name)
	statusext = false
	wait(15)
	statusext = true
else
	print("warn?")
end

game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive.ATransfer.OnClientEvent:Connect(function(moderator,text)
	if moderator then
		
		local plr = moderator
		script.Parent.PanelMain.Announcement.Main.Text = text
		script.Parent.PanelMain.Announcement.Title.Text = "ANNOUNCEMENT FROM " .. string.upper(plr.Name)
		script.Parent.PanelMain.Announcement.sam.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. plr.UserId .."&width=420&height=420&format=png"
		if plr:GetRankInGroup(8176838) >= 235 then
			print("ACcepted")
		else
			print("Not Accepted FAADADA")
		end
		
		
		script.Parent.PanelMain.Announcement:TweenSize(UDim2.new(1.881, 0,0.057, 0), "Out", "Quad", 0.001)
		wait(0.001)
		script.Parent.PanelMain.Announcement.Visible = true
		script.Parent.PanelMain.Announcement:TweenSize(UDim2.new(1.881, 0,0.652, 0), "Out", "Quad", 0.5)
		script.Parent.PanelMain.Announcement.ma:Play()
		wait(0.5)
		-- thinjing over lol
		wait(7)
		script.Parent.PanelMain.Announcement:TweenSize(UDim2.new(1.881, 0,0.057, 0), "Out", "Quad", 0.5)
		wait(0.45)
		script.Parent.PanelMain.Announcement.Visible = false
		
	end
end)


-- security + opening of the UI

if plr:GetRankInGroup(8176838) >= 50 then
	script.Parent.LeftTopPanel.Close_B.Visible = false
	script.Parent.LeftTopPanel.Open_B.MouseButton1Click:Connect(function()
		script.Parent.PanelMain.Visible = true
		script.Parent.LeftTopPanel.Open_B.Visible = false
		script.Parent.LeftTopPanel.Close_B.Visible = true
	end)

	script.Parent.LeftTopPanel.Close_B.MouseButton1Click:Connect(function()
		script.Parent.PanelMain.Visible = false
		script.Parent.LeftTopPanel.Open_B.Visible = true
		script.Parent.LeftTopPanel.Close_B.Visible = false
	end)



else
	script.Parent.PanelMain.Visible = false
end

Server Script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

game.ReplicatedStorage.T_Remotes.Session_Remotes.Send.OnServerEvent:Connect(function(player)
	game.ReplicatedStorage.T_Remotes.Session_Remotes.Receive:FireAllClients("Session Host: " .. player.Name)
end)

game.ReplicatedStorage.T_Remotes.Session_Remotes.Send.Send2.OnServerEvent:Connect(function(player)
	game.ReplicatedStorage.T_Remotes.Session_Remotes.Receive.Receive2:FireAllClients("Session Co-Host: " .. player.Name)
end)

game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementSend.OnServerEvent:Connect(function(player)
	game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive:FireAllClients("text")
end)

game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive.OnServerEvent:Connect(function(plr,text)
	local FilteredMessage = game:GetService("Chat"):FilterStringForBroadcast(text,plr)
	if plr:GetRankInGroup(8176838) >= 210 then
		game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive.ATransfer:FireAllClients(plr,FilteredMessage)
	else
		warn("This does not work with your rank." .. plr.Name)
	end
end)

game.ReplicatedStorage.T_Remotes.Session_Remotes.GetPlayer.OnServerEvent:Connect(function(moderator,plr)
	if plr:GetRankInGroup(8176838) >= 210 then
		game.ReplicatedStorage.T_Remotes.Session_Remotes.GetPlayer.GP2:FireAllClients(plr)
	else
		warn("Your not high enough rank wise." .. plr.Name)
	end
end)

All suggestions would be appreciated. B)

2 Likes

I don’t get what this means. Is :FireAllClients not working? Or do you mean that players can’t see server scripts?

No, I’m saying that nobody else, but myself can see the announcement UI that I made, same with the server info UI, trying the server host UI with values, instead of defining every text.

I want it to do the following,

Receive Announcement From TextBox > Getting that text > Putting it on the UI > Showing it for everyone

You set plr multiple times in the local script, which could be getting the wrong plr.

Try changing the moderator plr into something like
local modplr = moderator

1 Like

I would not fire to the clients for this but instead if I wanted the UI’s to change I would just change it via the server side by going into all of the players using a i, v loop thing and going through the plyaers PlayerGui then the ones u want.

The server cannot access a players PlayerGui. Using remote events is the right way to go here.

Are you sure as I have done it before and it has worked fine? I think it has anyways cuz I did test it and everyone could see it.

Remote events should always be used when trying to edit UI from the server, if the server is lagging it can take a lot longer to update the UI, and can cause unneeded lag (looping through all players vs just using :FireAllClients() once)

Yep, my friends couldn’t see it.

They couldn’t see the announcement nor the host / co-host text.
image

Providing you a video now, to help with any confusion.

K I can help more then. I will try help the best I can.

That video will explain everything.

I think I know what’s the issue, You could do this:

local clone = Gui:Clone()
clone.Text = --whatever you like
clone.Parent = player.PlayerGui

I’ve done this method before though, I don’t see why it wouldn’t work now.?

Maybe put the Gui in StarterGui and make it Disabled. Then you can make the script enable it again like this:

player.ScreenGui.Enabled = true

Try debugging, add a print(1) right before the if statement

like

game.ReplicatedStorage.T_Remotes.Session_Remotes.AnnouncementReceive.ATransfer.OnClientEvent:Connect(function(moderator,text)
    print(1)
	if moderator then

And see if its even printing for the other players. If not, its a server issue. If so, its a client issue.

It is printing for the others, I forgot to include that. But whenever the announcement is “verified” it will print “accepted” in console which it did, meaning that it is being fired, it is there it’s just not showing.

Try removing the if moderator then part, I think thats the issue.

That means the whole UI would be gone, I made it all in 1 to reduce anything. Which I have done before so, I don’t see an issue with making it all different and having to enable it even though it’s already enabled and is functioning and reading the script, but not showing.