Well, this mouse is complicated for me since I have not seen this many times and when I need it I ask for help. Well, I have a problem with changing the position of the Frame when clicking the textbutton, obtaining the location of the mouse and putting that position to the frame, the problem is that the frame is left the screen and I don’t know what to do to solve it
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Button = script.Parent
local Mouse = Player:GetMouse()
local GetFrame = script.Parent.Parent:WaitForChild("Frame")
Button.MouseButton1Click:Connect(function()
GetFrame.Position = UDim2.new(Mouse.X, 0, Mouse.Y, 0)
end)