When i say the text the gui doesn't change text I am a bit confused as why it doesn't work but please mind me I am very new to GUI scripting. (game.StarterGui.ScreenGui.Host.Text = (string.sub(Message, 6)) the host is the text box
local admin = "playername"
local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(Player)
if Player.Name == admin then
Player.Chatted:connect(function(Message)
if Message ~= nil then
if string.lower(string.sub(Message, 1 , 4)) == "text" then
game.StarterGui.ScreenGui.Host.Text = (string.sub(Message, 6))
end
end
end)
end
end)

5 comments
I still dont quite understand this can you explain more please?
Sure. Basically, the contents of StarterGui are cloned into every player's PlayerGui when they join. StarterGui serves as a kind of storage for templates, while the PlayerGui is where those guis end up. Each player has a PlayerGui, just like a Backpack. But, the guis copied from the StarterGui are copied locally, meaning the server won't see them. Therefor you need to use RemoteEvents to tell the
LocalScript to change the text of a label in the PlayerGui.
how come when I type this stuff in it doesn't work? Do they all need to be in a local script?
It also just sends not recieves