Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 09:11 AM |
It does tween, but not to the position it should, why?
mouse.Button2Down:connect(function() if mouse.Target.Name == "Grass" and (mouse.Hit.p - game.Players.LocalPlayer.Character.Torso.Position).magnitude<10 and debounce3 == false then
if Inv:findFirstChild("Grass") == nil then newgrass = Inv:findFirstChild("None") newgrass.Name = "Grass" newgrass.Num.Value = newgrass.Num.Value + 1 script.Picked:play() gui2 = newgrass:clone() gui2.Parent = Player.PlayerGui.Inventory.Frame gui2.Position = UDim2.new(0, mouse.X, 0, mouse.Y) wait(0.05) gui2:TweenPosition(UDim2.new(0, newgrass.Position.X, 1, -48), "Out", "Quad", 0.5)
-- Line above breaks, It tweens but not to the newgrass.Position.X, it goes randomly to end of screen
wait(0.5) gui2:remove() |
|
|
| Report Abuse |
|
|
Verthandi
|
  |
| Joined: 21 Apr 2014 |
| Total Posts: 65 |
|
|
| 17 May 2014 09:16 AM |
"newgrass.Position.X"
Remember that there is Offset and Scale.
You probably want newgrass.Position.X.Offset |
|
|
| Report Abuse |
|
|
Verthandi
|
  |
| Joined: 21 Apr 2014 |
| Total Posts: 65 |
|
|
| 17 May 2014 09:18 AM |
Wait, is newGrass a part?
If so, ignore what I just said. |
|
|
| Report Abuse |
|
|
Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 09:22 AM |
| No, newgrass is a TextButton, its one of 12 "Inventory Slots" |
|
|
| Report Abuse |
|
|
| |
|
Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 09:25 AM |
| Ohh! Offset worked! Thank you |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 17 May 2014 09:27 AM |
| Funny how I posted the same solution in your other thread and you didn't use it. |
|
|
| Report Abuse |
|
|
Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 09:27 AM |
| I was playing minecraft, I think I forgot about it... Sorry |
|
|
| Report Abuse |
|
|