i am trying to make a game were you click and at that position instences new frame but once i click frame instences bellow the cursor or higher
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
local dot = Instance.new("Frame")
dot.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
dot.Position = UDim2.new(mouse.X/game.workspace.CurrentCamera.ViewportSize.X,0, mouse.Y/game.workspace.CurrentCamera.ViewportSize.Y,0)
dot.Size = UDim2.new(0, 20, 0, 20)
dot.BorderSizePixel = 0
dot.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
end)

2 comments
Use scale instead of offset.
Or use use offset since hes wanting it set based off pixles, lol