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

is there any other UI Children. Such as "TextBox" but numbers instead?

Asked by
wookey12 174
7 years ago
Edited 7 years ago

im trying to make a for loop where one of the values is the text from a texbutton gui problem is, it says forloops can only take number values is there any way to fix this? i type numbers into the text button, but it still does not work

code:


wait(1) local player = script.Parent.Parent.Parent.Parent local Mouse = player:GetMouse() script.Parent.Parent.Parent.Start.StartButton.MouseButton1Click:connect(function(click) wait(1) for i = script.Parent.Parent.Parent.Objects.Object.Position,script.Parent.Text,.1 do script.Parent.Parent.Parent.Objects.Object.Position = script.Parent.Parent.Parent.Objects.Object.Position + UDim2.new(0,0,0,i) wait(.5) end end)
0
You can use numbers. If it's not letting you, you're doing something wrong. minikitkat 687 — 7y
0
you wanna bet? wookey12 174 — 7y
0
Players.wookey12.PlayerGui.ScreenGui.TextBox.Script:6: 'for' initial value must be a num wookey12 174 — 7y
0
That's a code error you have there. If it's troubling you, post a new question regarding it. lukeb50 631 — 7y
View all comments (6 more)
0
i added the code, do i have an error? wookey12 174 — 7y
0
@TheeDeathCaster so i didn't make an error? thank you! wookey12 174 — 7y
2
uhh it would be tonumber("script.Parent.Text") right? if it is, it didn't work. maybe it has to do with the position? wookey12 174 — 7y
0
No. doing "script.Parent.Text" is what it is actually trying to become, not the text in the textbox. hiimgoodpack 2009 — 7y
0
@hiimgoodpack that's what the textbox is though....... the script is parented in the textbox if i say script.Parent.Text, it means the text in textbox... wookey12 174 — 7y

Answer this question