Alright, that solves it then. I’m assuming you are trying to change the text of another player’s gui with another player’s local script. You can change the text with a local script, but it would not show for that player due to it being on another player’s client, therefore only changing it for that player.
if you were trying to change everyone’s gui, you would need to use a server script. But, to get the text in the TextBox, you would need to use a local script and a Remote Event. So, here’s the setup.
local box = script.Parent
local txt = box.Parent.Label
local event = script.Parent.Event --make a remote event named "Event"
function change() --I just changed the function a bit.
local event = script.Parent.Event
--you should probably do a security check here so no hacker can use this event.
for i,v in pairs(game.Players:GetChildren) do --this is to do this for everyone.
v.PlayerGui.--[[the path]].Text = text