62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 20 Nov 2015 06:28 PM |
script.Parent.Dot.Position = UDim2.new(0,final_x - script.Parent.Dot.AbsoluteSize.X * .5,0,final_y - script.Parent.Dot.AbsoluteSize.Y * 2)
This is some code that works, I'm trying to get it so when the 'Dot' moves at the cursor's position, that it ends up almost perfectly on the cursor. Right now it's a little offset from it, so I did some things to try to perfect it. It worked, but something odd happens that as I'm dragging the dot downwards it stops at Y 73. Why? I didn't tell the rest of the code to make it stop at Y 73. (The Y coordinate = 73) It's something with the multiplication I put on this line, though if I make it smaller, the dot appears more offset from the mouse' cursor, yet, can be dragged further downwards. |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 20 Nov 2015 06:44 PM |
| b? It's really irritating if it's offset from the actual position of the cursor! Cause due to this tacky menu system if the cursor comes in contact with it it stops moving the dot any further upwards. I need to get this dot to move right to the cursor. No offset at all. Any suggestions? |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 20 Nov 2015 06:48 PM |
Output?
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 20 Nov 2015 06:50 PM |
Hai Santa Daug. It's not christmas tho
This isn't an output problem. The 'dot' ImageLabel appears offset of the mouse' cursor's actual position. For example, I tell the script to position it on the mouse' cursor position. It appears a few studs offset. It's the Y coordinate that's giving me issue. |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 20 Nov 2015 06:51 PM |
Dogemas*
I meant any errors but I'll take that as no errors, lemme do somethinking, while I'm not here let someone else save u, other wise i'll come back
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 20 Nov 2015 06:52 PM |
Lol dogemas xD
Thanks bruh. [Still on the hunt for help] |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 20 Nov 2015 07:01 PM |
http://wiki.roblox.com/index.php?title=Mouse
Maybe that'll help
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 20 Nov 2015 07:08 PM |
I'm gonna assume you're using offset
local Player=game.Players.LocalPlayer -- Assuming you're using localplayer
local Gui=DefineHere
while wait(.001) do Gui.Position=UDim2.new(0,Player:GetMouse().X,0,Player:GetMouse().Y) end
Better scripters can make it better/fix tho
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 20 Nov 2015 07:08 PM |
Assuming you're using localscript*
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 20 Nov 2015 07:10 PM |
Wow dude.. I can't believe that worked! Thank you!! I never knew you could do that, I always did:
m.hit.p.X and so on... Now I know!! :D |
|
|
| Report Abuse |
|
|