I would like my GUI to be visible for a certain team only (bright yellow("Host"))
so I've tried to make a script that will just copy the GUI in player GUI
local Person = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if Person.Name == "4581quzwi" then
workspace.TeamEvents.TeamEvent:FireServer(script.Parent.Text)
local gui = game.ServerStorage.Host
gui.Parent = Person.PlayerGui;
end
end)
but for some reason, thee Gui always deletes itself (I've tried Replicated server storage lightning and workspace)
can anyone please help me with the issue or the script
-4581quzwi

2 comments
i would like to constantly check for it because when you join you are always a memebr of audience only certain people can become a host with a certain button but the script only detects it once would i be able to put the script in a while true do loop?
Yes, you could do it that way, do you want an example?