Alright, so I added a GUI and a frame under the GUI and a script under the frame. My script was this:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local frame = script.Parent
local x
local y
local pressed = false
mouse.Button1Down:Connect(function()
pressed = true
end)
mouse.Button1Up:Connect(function()
pressed = false
end)
while wait(0.01) do
x = mouse.X
y = mouse.Y
if pressed == true then
local dot = Instance.new("ImageLabel")
dot.Parent = frame
dot.Name = "Dot"
dot.BackgroundTransparency = 1
dot.Image = "http://www.roblox.com/asset/?id=3195888012"
dot.ImageColor3 = Color3.new(0,0,0)
dot.Size = UDim2.new(0, 3, 0, 3)
dot.Position = UDim2.new(0, x, 0, y)
end
end
I believe that the dot.Position is written out wrong. Anyone out there that knows how to fix it? Try it out yourself.

6 comments
Answering the question in the title: If you give the computer bad instructions you get bad results. Secondly, what isn't working as intended? We don't know what the problem is, post a video of what's happening.
Alright.
https://gyazo.com/54f4730740c4f38eaf00e97674193b1a
I also simply asked to try it out yourself but ok.
No, you edited that part in later.
thats what i mean -_-