local brick = game.Workspace.redgate.gate
function onTouch(brick)
player:WaitForDataReady()
player:SaveString("team", "painless")
game.Players:findFirstChild(brick.Parent.Name).PlayerGui.ScreenGui.TextBox.Text = player:LoadString("team")
end
brick.Touched:connect(onTouch)
Hello, I posted this on Scripting Helpers (forum) but had no replies. I see no reason for it to not work. It is supposed to set a datapersistance and then set the text in the GUI to the team name.
Thanks in advance, Darklaer.
UPDATE: I checked the output and saw this in it: gate is not a valid member of Script

2 comments
Any answers?
Data persistence should no longer be used because it has been deprecated. Use data stores instead, they are much more reliable and they allow you to save much more information.