Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 12 Jun 2017 03:36 PM |
When I run this, saying "commands" makes the GUI move out of its position, but when I say "commands off" only one child of my script's parent moves back to -400. If I say "commands" again, the one child does not move back to its position.
To test it: https://www.roblox.com/games/862131713/Empty-Lot
wait(3) for i, v in pairs(game.Players:GetPlayers()) do if v.Character.Name == "Sabaist" then v.Chatted:connect(function(msg) if msg == "Commands" or "commands" then for s, h in pairs(script.Parent:GetChildren()) do toggle = false if h:IsA("TextBox") and toggle == false then h:TweenPosition(UDim2.new(0, 400, 0, h.Position.Y.Offset), 'In', 'Bounce', 3) toggle = true end end end end) end end for o, b in pairs(game.Players:GetPlayers()) do if b.Character.Name == "Sabaist" then b.Chatted:connect(function(msg) if msg == "Commands Off" or "commands off" then for d, j in pairs(script.Parent:GetChildren()) do if j:IsA("TextBox") and toggle == true then j:TweenPosition(UDim2.new(0, -400, 0, j.Position.Y.Offset), 'Out', 'Bounce', 3) toggle = false end end end end) end end |
|
|
| Report Abuse |
|
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 12 Jun 2017 03:46 PM |
| Sorry I forgot to change it in-game for anyone's use. |
|
|
| Report Abuse |
|
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 12 Jun 2017 09:07 PM |
| bump, I need it to work either on saying "commands" and "commands off" or turning it on and off by just using "commands". |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 09:21 PM |
I think you are supposed to do something like...
onoroff = true
--if you want it on j:TweenPosition(UDim2.new(0, -400, 0, j.Position.Y.Offset), 'Out', 'Bounce', 3, on)
--and then when you want it to stop onoroff = false j:TweenPosition(UDim2.new(0, -400, 0, j.Position.Y.Offset), 'Out', 'Bounce', 3, on)
|
|
|
| Report Abuse |
|
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 12 Jun 2017 11:27 PM |
| I feel as though the problem is related to the toggle and the children being related. |
|
|
| Report Abuse |
|
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 12 Jun 2017 11:30 PM |
| So, apparently the problem was related to the toggle, I switched all of them to false, and it works fine. Now the only problem I have is the GUI being activated again by saying "commands" after saying "commands off", which it doesn't do. |
|
|
| Report Abuse |
|
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
| |
|
Sabaist
|
  |
| Joined: 17 Feb 2012 |
| Total Posts: 378 |
|
|
| 14 Jun 2017 11:30 AM |
| It works, you can visit the testing grounds to try out SST 1.0. |
|
|
| Report Abuse |
|
|