|
| 19 Jun 2014 05:31 PM |
Seams kinda long for what it's suppose to do...
What I want it to do is when I click the button, ask to but something from the player, that works. What else is when I hover over the GUI I want it to move to the right a bit, than when It leaves I want it to move back, but it's really glitchy and doesn't work all the time, and also I want to shorten up the code.
local MarketplaceService=Game:GetService("MarketplaceService") local buy1=script.Parent.Buy1
script.Parent.Buy1.MouseButton1Click:connect(function() MarketplaceService:PromptProductPurchase(player,20190046) end) buy1.MouseEnter:connect(function() if not moving then moveing=true buy1:TweenPosition(UDim2.new(0,20,0,250),"Out","Quad",.2) wait(.2) moveing=false end end) buy1.MouseLeave:connect(function() if not moving then moveing=true buy1:TweenPosition(UDim2.new(0,0,0,250),"Out","Quad",.2) wait(.2) moveing=false e |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 05:32 PM |
the "e" at the end should be end end) |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 19 Jun 2014 05:32 PM |
You keep spelling moving differently.
Get rid of that random e. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 05:34 PM |
| Thanks, but can you make it shorter please? |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 05:34 PM |
Do you need the "if moving then moving = whatever" bit?
Cant you just do
MouseEnter event Tween
MouseLeave event Tween
(Too lazy, and you should get the point) |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 05:35 PM |
| It glitches the fk out and breaks when you try to tween the same thing at one time. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 20 Jun 2014 01:42 AM |
Them put bool override = false
So right before the final bracket of both Tweens put ,false.
Eg: ..."Quad",false) |
|
|
| Report Abuse |
|
|
Oreoism
|
  |
| Joined: 11 Apr 2014 |
| Total Posts: 64 |
|
|
| 20 Jun 2014 03:03 AM |
i'm on my ipod so this may or may not work
local MarketplaceService = Game:GetService("MarketplaceService") local buy1 = script.Parent.Buy1
buy1.MouseButton1Click:connect(function() MarketplaceService:PromptProductPurchase(player, 20190046) end) buy1.MouseEnter:connect(function() buy1:TweenPosition(UDim2.new(0, 20, 0, 250), "Out", "Quad", 0.2, true) end) buy1.MouseLeave:connect(function() buy1:TweenPosition(UDim2.new(0, 0, 0, 250), "Out", "Quad", 0.2, true) end) |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2014 03:34 AM |
| Why do you need it shorter if the script works who cares xD |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2014 03:36 AM |
| lmao I didn't read the entire thing -Which I never do- kinda makes me look stupid sorry I thought you wanted the script shorter. |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2014 11:12 AM |
| I decied to just remove the tweening all together, it makes it work perfectly, and as I said before you can't Tween the same GUI twice before it stops. |
|
|
| Report Abuse |
|
|