Avocation
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 107 |
|
|
| 14 Feb 2015 10:02 PM |
I tried to get a GUI to follow the players mouse but it said that Position is not part of Mouse
This is my script:
local Mouse = script.Parent.Parent.Parent.Parent:GetMouse()
repeat wait() if script.Parent.mouseState.Value == true then script.Parent.Position = Mouse.Position end until script.Parent.Parent == nil |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 14 Feb 2015 10:05 PM |
local mouse = game.Player.LocalPlayer:GetMouse()
mouse.Move:connect(function() if script.Parent.mouseState.Value == true then script.Parent.Parent.Position = UDim2.new(0,mouse.X,0,mouse.Y) end end) |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2015 11:25 PM |
| It kinda irritates me how it's needed to use offset. |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2015 11:49 PM |
| Dividing the X Offset by 1000 and the Y by 500 seems to fix the issue. |
|
|
| Report Abuse |
|
|