|
| 16 Apr 2014 03:05 PM |
Right. No error in output. Nothing in output. I want to cry. qq
local button = script.Parent local bounce = false local Alpha = script.Parent.Parent.Frame.Alpha local Bravo = script.Parent.Parent.Frame.Bravo local Charlie = script.Parent.Parent.Frame.Charlie local Delta = script.Parent.Parent.Frame.Delta button.MouseButton1Up:connect(function() if bounce == true then return end bounce = true if Alpha.Position == UDim2.new(0,20,0,20) then for i = 1,25 do Alpha.Position = Alpha.Position + UDim2.new(0.02,-4,0.02,-4) Bravo.Position = Bravo.Position + UDim2.new(-0.02,4,0.02,-4) Charlie.Position = Charlie.Position + UDim2.new(0.02,-4,-0.02,4) Delta.Position = Delta.Position + UDim2.new(-0.02,4,-0.02,4) button.BackgroundTransparency = button.BackgroundTransparency + 0.02 button.TextTransparency = button.TextTransparency + 0.04 wait() end end ------What? if Alpha.Position == UDim2.new(0.5,-80,0.5,-80) then local base = script.Parent.Parent.Parent.Center local left = base.Left local right = base.Right print(base) print(right) print(left) end bounce = false end)
|
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 16 Apr 2014 03:07 PM |
| Put print("Lol hi") after every 4 lines, where it stops, we'll know where the error is. |
|
|
| Report Abuse |
|
|
powertool
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 3771 |
|
|
| 16 Apr 2014 03:17 PM |
So what's it supposed to do? Animate a GUI once you click the GUI?
Try button.MouseButton1Down. What are you trying to do anyway?
--This replaces your thing at/near the top. Right below the bounce = true line, then down to the "Waht?". There's this thing called Tweening, it makes GUI animation painless. if Alpha.Position == UDim2.new(0,20,0,20) then Alpha:TweenPosition(UDim2.new(0.5, -100, 0.5,-100), 1, 0, 1, true) Bravo:TweenPosition(UDim2.new(-0.5, 100, 0.5,-100), 1, 0, 1, true) Charlie:TweenPosition(UDim2.new(0.5, -100, -0.5,100), 1, 0, 1, false) Delta:TweenPosition(UDim2.new(-0.5, 100, -0.5,100), 1, 0, 1, false) for i=1,25 do button.BackgroundTransparency = button.BackgroundTransparency + 0.02 button.TextTransparency = button.TextTransparency + 0.04 wait(1/25) end end
--Shira |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2014 03:41 PM |
| Don't understand any of it. XD Mindblown. Thanks. |
|
|
| Report Abuse |
|
|
powertool
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 3771 |
|
|
| 16 Apr 2014 03:45 PM |
All I did was tween your GUI over the period of a second over the full movement you were doing the laggy way, so I optimized that.
--Shira |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2014 04:26 PM |
| Can you explain it? My goal isn't to just put stuff together, I want to understand it, as well. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2014 05:05 AM |
Alpha:TweenPosition(UDim2.new(0.5, -100, 0.5,-100), 1, 0, 1, true)
the "1, 0, 1, true". Can someone explain that? |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2014 07:10 AM |
Let's look at this, shall we:
a = 1 --First 1 b = 0 c = 1 --Second 1 d = true
a is the EasingDirection enum "Out". This just applies the tweening normally. If we changed a to 0, it would apply the tweening backwards. If we changed a to 2, it would firstly tween backwards, then normally. b is the EasingStyle enum "Linear". The linear enum determines the speed to get to the endPosition, depending on what c is equal to. (So c is the time it takes to get to the destination. d is just an override value. If it's true, you can apply another tween to the gui object, while the other one is taking place. It's default value is false, which means you can't apply other tweens to that object while that tween is in place.
Further reading: http://wiki.roblox.com/index.php?title=EasingDirection_(Enum) http://wiki.roblox.com/index.php?title=EasingStyle_(Enum) http://wiki.roblox.com/index.php/TweenPosition_(Method)
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2014 07:11 AM |
I forgot a bracket at the end of the second paragraph, I'm such a noob. xD
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|