Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 07:28 AM |
Ok here's the problematic code, I am pretty sure its not problem in ends so I didnt post it...
~ The problem is, when I click mouse.Target with RMB it creates gui that should tween at position of "newgrass" but it doesnt... IT does appear at mouse position, but it does not move to newgrass.Position.X correctly
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) wait(0.5) gui2:remove() |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 17 May 2014 07:48 AM |
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.Offset, 1, -48), "Out", "Quad", 0.5) wait(0.5) gui2:remove()
|
|
|
| Report Abuse |
|
|
Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
|
| 17 May 2014 09:04 AM |
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.Offset, 1, -48), "Out", "Quad", 0.5) wait(0.5) gui2:remove()
Still doesn't work |
|
|
| Report Abuse |
|
|