I'm creating a GUI system that creates a Team with a desired name that the player inputs into a TextLabel on the GUI. I have it all working correctly except for a part where the script is supposed to check if the TextLabel's Text was changed and, if so, it should print what was changed. The problem is that "AbsolutePosition" is printed so many times after the GUI Frame moves into it's Position, when :TweenPosition() was used. Below is the script.
local teamName = ""
local CreateTeamGui = script.Parent
local CreateTeamActivated = false
function nameInput(name)
if CreateTeamActivated == true then
for i = 1, #name do
teamName = string.sub(name, 1, i)
end
print(teamName) --This is what's printed when TeamNameLabel.Changed is called
end
end
script.Parent.Parent.GuiHandler.ForCreateTeam.OnServerEvent:connect(function() --Event is called when the player clicks on a button to Create a Team then checks for the following:
if script.Parent.Parent.CreateTeamActive == false then
return
else
CreateTeamActivated = true
end
end)
CreateTeamGui.TeamNameLabel.Changed:connect(nameInput) --I tried other things and of course doing TeamNameLabel.Text.Changed is not a thing... :C
I believe that something on wiki's string manipulation page should help with this partly but I have no idea what. If anything else you guys think should be changed then please add that to your answer. So Appreciated, Much Thanks.

1 comment
What you did had not done anything to really fix the problem. This actually doesn't do anything at all.