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)
Now i am on my computer and can test this myself, here is a working version
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(0,mouse.X,0, mouse.Y) dot.Size = UDim2.new(0, 20, 0, 20) dot.BorderSizePixel = 0 dot.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame end)