Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Adding one to a GUI?

Asked by
NotSoNorm 777 Moderation Voter
10 years ago

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

Log in to vote
-1
Answered by
Asirix 15
10 years ago

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)
0
I don't need the Tweening to change I need the text to change? D: NotSoNorm 777 — 10y
0
That is the Text. Look "Numbers.Frame.Ones.Text" Asirix 15 — 10y
Ad

Answer this question