alright so in my script i have it where when a player clicks one gui it makes another visible or not visible which works fine but im wanting it to set the top left corner of the gui to where the mouse was at the time of the click which does not work ive had it going into the hundreds with position and what ive got now is the closest ive got to it working
Script:
local MainGui = script.Parent.Parent.Parent.MainFrame
local PlayerOptions = MainGui.PlayerOptions
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
script.Parent.MouseButton2Click:Connect(function()
PlayerOptions.Position = UDim2.new(0, Mouse.X/5.5, 0, Mouse.Y/5.5) -- the issue here
PlayerOptions.Visible = not PlayerOptions.Visible
end)

3 comments
You're looking for Mouse.[RelativeAxis]/Mouse.ViewSize[RelativeAxis]; Mouse.X/Mouse.ViewSizeX.
alright thanks man ill try this once i get home ive seen this somewhere before but forgot about it
didnt work out stays in the top left corner of the frame its in