I’m trying to make a placement system for my game, but I can’t figure out how to move a frame to the cursor parented to a square-shaped frame.
How to move a frame to the mouse cursor inside of a square frame
Sorry, I don’t fully understand what you mean.
- Do you have a cursor that is parented to a frame?
- Are you trying to move a frame parented to the same frame to the same position as the cursor?
- The label is the smaller frame and the squared frame is the bigger frame. The label is meant to teleport to the mouse cursor, which is parented to the squared frame.
- You can’t even parent a frame to itself, but I want the label (which is parented to the frame) to be teleported to the cursor.
Sorry for the confusion in my questions, let me clear it up:
- Do you have a cursor that is parented to frame with green?
- Are you trying to move the gray frame parented to the the green frame to the same position as the cursor?
If the gray frame has the same parent as the cursor, then you can just move it whenever you move the cursor?
If the gray frame does not have the green frame as parent, then you could use AbsolutePosition. If you’d rather use scale, then you can use absoluteSize too in order to calculate the percentages.
- You can parent cursors? If so, how do I parent the cursor to the green frame?
duplicate topic, if you want to bump your last topic you can do so by replying there.
I thought the cursor was a custom cursor for that specific frame:
But no, you cannot.
Otherwise, as I suggested, just use Mouse.X, Mouse.Y to get the position, and then use AbsolutePosition to move stuff