This is either a difficult script to write, or I'm just dumb (which is probably the case), I have a gui that when you press a text button it will create a new text button in a scrolling frame that has the same name as a text box. eventually I will make it so it adds a team with the same name, but for now I have to figure this out.

Here's my first attempt at the script, which doesnt work, but doesnt give me any errors:

local input = script.Parent
local button = input.Parent
local place = button.Parent.ScrollingFrame
local team = place.TextButton

button.MouseButton1Up:Connect(function()
	local addedteam = team:Clone()
	addedteam.Visible = true
	addedteam.Text = input.Text
end)

2 comments

0

The cloned Instance's 'Parent' field is default set to nil. You need to instruct on where it shall go.

0

tysm!