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

Adding one to a GUI?

Im confused on how to make this, So basically when I click this button I want it to add 1 number to the original number Example:

0,0,0,0 (Clicked on button) 0,0,0,1

function Clicked()
	script.Parent:TweenPosition(UDim2.new(0.5,0,-4.3,0),"Out","Linear",1,true,nil)
	script.Parent.Parent.Parent.Numbers.Frame.Ones.Text = ?????
end

script.Parent.MouseButton1Down:connect(Clicked)

how?

1 answer

You need to have the old position for example here:

PO = script.Parent.Position
T = script.Parent.Parent.Parent.["Numbers"]

function Clicked()
Numbers.Frame.Ones.Text = PO + Udmi2.new(0,0,0,1)
end

script.Parent.MouseButton1Click:connect(Clicked)

2 comments

0

I don't need the Tweening to change I need the text to change? D:

0

That is the Text. Look "Numbers.Frame.Ones.Text"

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