generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GUI Tweening?

Previous Thread :: Next Thread 
Sabaist is not online. 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 is not online. 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 is not online. 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
stephenthefox is not online. stephenthefox
Joined: 11 Mar 2011
Total Posts: 1123
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 is not online. 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 is not online. 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 is not online. Sabaist
Joined: 17 Feb 2012
Total Posts: 378
13 Jun 2017 11:38 AM
bump
Report Abuse
Sabaist is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image