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 » Scripting Helpers
Home Search
 

Re: GUI Tweening

Previous Thread :: Next Thread 
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Jul 2014 08:05 PM
I haven't been active on Roblox for about a month, but I noticed my GUI tweening isn't working anymore.

Script:

local GameScript = Workspace:FindFirstChild("Game")
local voting = GameScript.Voting
local Frame = script.Parent
local player = script.Parent.Parent.Parent.Parent
local vote = player:WaitForChild("Voted")

modeTab = {"Original", "Reverse Controls", "First Person Lock", "Crown Player", "Infected", "Juggernaut"}
picture = {["Crossing"] = 162727322, ["Bunker"] = 162727382, ["Paintball Range"] = 162727352,
["Gas Stop"] = 163906767}

pcall(function()
if voting.Value == true then
if vote.Value == true then return end
wait(2)
Frame.Visible = true
print("Tweening voting GUI.")
Frame:TweenPosition(UDim2.new(0.3, 0, 0.3, 0), "Out", "Quad", 3, true, nil)
local children = game.ServerStorage.Voting
for i = 1, #children:GetChildren() do
Frame["Map"..i].MapName.Text = children["Map"..i].Value
Frame["Map"..i].Button.Image = "http://www.roblox.com/asset/?id="..picture[children["Map"..i].Value]
Frame["Map"..i].Mode.Text = modeTab[children["Map"..i].Mode.Value]
end
end
end)


voting.Changed:connect(function()
if voting.Value == true then
if vote.Value == true then return end
wait(2)
Frame.Visible = true
print("Tweening voting GUI.")
Frame:TweenPosition(UDim2.new(0.3, 0, 0.3, 0), "Out", "Quad", 3, true, nil)
local children = game.ServerStorage.Voting
for i = 1, #children:GetChildren() do
Frame["Map"..i].MapName.Text = children["Map"..i].Value
Frame["Map"..i].Button.Image = "http://www.roblox.com/asset/?id="..picture[children["Map"..i].Value]
Frame["Map"..i].Mode.Text = modeTab[children["Map"..i].Mode.Value]
end
elseif voting.Value == false then
print("No more voting.")
vote.Value = false
Frame.Visible = false
Frame.Position = UDim2.new(-0.4, 0, 0.3, 0)
end
end)

It passes through the entire code(no errors even w/o pcall) and does the print statement, but it isn't tweening anymore. Help?
Report Abuse
UncleTaz is not online. UncleTaz
Joined: 19 Aug 2009
Total Posts: 12795
21 Jul 2014 08:09 PM
Has to be in a local script :(
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Jul 2014 08:11 PM
It worked fine in a normal script when I was last on Roblox. Could you explain why it has to be local now please?
Report Abuse
UncleTaz is not online. UncleTaz
Joined: 19 Aug 2009
Total Posts: 12795
21 Jul 2014 08:16 PM
According to stravant;

"...is due to the tween manager being moved over to use RenderStepped, but the server doesn't render; the client does. "

http://wiki.roblox.com/index.php?title=Change_Log/GameTest1

Don't worry, it's only temporary ^_^
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Jul 2014 08:21 PM
Well, my game is broken now, but at least the Tween works. :D
Report Abuse
BobertKalinak is not online. BobertKalinak
Joined: 08 Jul 2014
Total Posts: 47
21 Jul 2014 08:21 PM
Although good practice is to have GUI's be operated by LocalScripts anyway, as they are local.
Report Abuse
UncleTaz is not online. UncleTaz
Joined: 19 Aug 2009
Total Posts: 12795
21 Jul 2014 08:22 PM
But then it'll break again once the update comes so.. lol
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
21 Jul 2014 08:28 PM
@Uncle,
You're basing that on what exactly? Tweening works both server-side and client-side. They are fixing the issue with server-side tweening, not removing client-side tweening in favour of the other.

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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