DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 05:14 PM |
Is there a way say I have 4 Text Buttons. 1. TextButton called "1" 2. TextButton called "." 3. TextButton called "5" 4. TextButton called "3"
Now when you press 1 for instance it changes a text to "1" When you press . for instance it changes the text to "1." When you press 5 for instance it changes the text to "1.5". When you press 3 for instance it changes the text to "1.53"
Can someone script this for me I can do the parents. |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
| |
|
Funse
|
  |
| Joined: 11 Jun 2012 |
| Total Posts: 7887 |
|
|
| 10 Mar 2015 06:03 PM |
WAYYYY TO VAGUE.
Now when you press 1 for instance Press 1 on the keyboard, or while typing on the textbutton? it changes a text to "1" What text?
|
|
|
| Report Abuse |
|
|
Stefan631
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 10 Mar 2015 06:16 PM |
local textlabel = script.Parent.TextLabel;
for _, v in pairs(textlabel:GetChildren()) v.MouseButton1Down:connect(function() textlabel.Text = (textlabel.Text..(v.Text)) end); end; |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 06:31 PM |
| What do i place for the "for _,"? And the "v" is underlined red... |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2015 06:32 PM |
@DevKonner This should explain it. http://wiki.roblox.com/index.php?title=Concatenation |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2015 06:36 PM |
It's only printing 'string' not number.
local text = script.Parent local plr = game.Players.LocalPlayer local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) print(type(key)) end)
Even with tostring
local text = script.Parent local plr = game.Players.LocalPlayer local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) print(tostring(type(key))) end)
"I like to program." - Bosswalrus |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 07:35 PM |
| No. Its not printing its changing the text... |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 10 Mar 2015 07:37 PM |
| Why not just use a TextButton.. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 10 Mar 2015 07:39 PM |
local text = ""
textButton.MouseButton1Click:connect(function() text = text..textButton.Name end)
Would that work?
Give me suggestions on the sniper rifle in this game: [http://www.roblox.com/Animations-place?id=200667607] |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 10 Mar 2015 07:40 PM |
| Textbuttons already let you type into them m888 |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 10 Mar 2015 07:41 PM |
Those are textboxes
Give me suggestions on the sniper rifle in this game: [http://www.roblox.com/Animations-place?id=200667607] |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 07:43 PM |
Its not working ;/ .
I need to be able to press the TextButton "1" and it will change the text to "1" ext. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 07:50 PM |
| Wrong. Its a TextButton with the text "1" you click it and it changes a text. BUT Im making a radio so I don't know if a TextBox or TextButton will work. Because my goal is you pick a Frequency and Channel and a radio will pop up. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 10 Mar 2015 07:51 PM |
Did you try mine?
Give me suggestions on the sniper rifle in this game: [http://www.roblox.com/Animations-place?id=200667607] |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 07:56 PM |
| Well I will try a TextBox its just I dont know how to make a script to when you choose your Frequency and Channel a new GUI pops of the the Frequency and Channel. And also allows other people to go on the same radio if they are on the same frequency and radio. |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 10 Mar 2015 07:57 PM |
| What I have is you pick your FREQ. and CHAN. and then press ENT then they radio will pop up of the CHAN and FREQ you chose. |
|
|
| Report Abuse |
|
|