Had many UDim2 animations script fixed. But this one does still only work in Studio?
Asked by
8 years ago Edited 8 years ago
I have a lot of scripts with UDim2 animations for my Gui.
First fix is that it got changed to Local Script
Second fix is that I used WaitForChild()
But this single script does still not work. (Not at all)
It works completely fine in studio. It gives me no errors.
02 | local backbutton = script.Parent.Parent.Back |
03 | local Image = script.Parent.Parent:WaitForChild( "Island" ) |
04 | local Loco = script.Parent.Parent:WaitForChild( "Loco" ) |
07 | script.Parent:TweenPosition(UDim 2. new( 0.9 , 0 , - 0.9 , 0 ), "Out" , "Quad" , 1 ) |
08 | script.Parent.Parent.TextButton:TweenPosition(UDim 2. new(- 0.9 , 0 , 0.9 , 0 ), "Out" , "Quad" , 1 ) |
09 | script.Parent.Parent.Change:TweenPosition(UDim 2. new( 0.5 , 0 , 0.3 , 0 ), "Out" , "Quad" , 1 ) |
10 | Image:TweenPosition(UDim 2. new( 0.9 , 0 , 0.4 , 0 ), "Out" , "Quad" , 1 ) |
11 | Loco:TweenPosition(UDim 2. new( 0.42 , 0 , - 0.9 , 0 ), "Out" , "Quad" , 1 ) |
13 | backbutton.BackgroundTransparency = 1 - i/num/ 2 |
14 | backbutton.TextTransparency = 1 - i/num/ 2 |
17 | if backbutton.BackgroundTransparency = = 0.5 then |
19 | backbutton.BackgroundTransparency = backbutton.BackgroundTransparency - 0.01 |
20 | backbutton.TextTransparency = backbutton.TextTransparency - 0.01 |
25 | script.Parent.Parent.Back.Active = true |
29 | script.Parent.MouseButton 1 Down:connect(onClicked) |