Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Demo script writing

I wrote this by self without looking at any other source. When you click a TextButton its Parent will grow. Did I code right? Did I miss something out? Did I completyl muss up.

local Frame = script.Parent.Parent

function Run(OnClicked)
	Frame:Tweensize(0.5,0 0.5,0) ,"In","Quad","20","true"
end

Run(Hit1Button1)

1 answer

✓ Accepted answer

Yes you did mess up.

local Frame = script.Parent.Parent
local TB = Frame.TextButton -- get the text button from the frame

function Click()
	Frame:TweenSize(UDim2.new(0.5,0,0.5,0),"In","Quad",20,true)
end

TB.MouseButton1Click:connect(Click) -- now when the text button gets clicked on it will activate the Click() function

This discussion is preserved as it was. New answers, comments, and votes are closed.