game:GetService(“RunService”).RenderStepped:Connect(function()
x = mouse.X
y = mouse.Y
if pressed == true then
local dot = Instance.new(“Frame”)
dot.Name = “Dot”
dot.Parent = frame
dot.BackgroundColor3 = Color3.new(0,0,0)
dot.Size = UDim2.new(0, 6, 0, 6)
dot.Position = UDim2.new(0, x - frame.AbsolutePosition.X, 0, y - frame.AbsolutePosition.Y)
end
end)
ClearButton.MouseButton1Click:Connect(function()
for i, q in pairs(frame:GetChildren()) do
if q.Name == “Dot” then
q:Destroy()
end
end
end)
local color = Color3.fromRGB(255, 0, 0)
(dot.BackgroundColor3 = color)
RedButton.MouseButton1Click:Connect(function)
color = Color3.fromRGB(0, 0, 0)
end)
Players.3DRobloxGameDev.PlayerGui.Options.Startup.frame.LocalScript:39: Ambiguous syntax: this looks like an argument list for a function call, but could also be a start of new statement; use ‘;’ to separate statements
local frame = script.Parent local mouse = game.Players.LocalPlayer:GetMouse() local ClearButton = script.Parent.ClearButton
local x local y local pressed = false mouse.Button1Down:Connect(function() pressed = true end) mouse.Button1Up:Connect(function() pressed = false end)
game:GetService("RunService").RenderStepped:Connect(function() x = mouse.X y = mouse.Y if pressed == true then local dot = Instance.new("Frame") dot.Name = "Dot" dot.Parent = frame dot.BackgroundColor3 = Color3.new(0,0,0) dot.Size = UDim2.new(0, 6, 0, 6) dot.Position = UDim2.new(0, x - frame.AbsolutePosition.X, 0, y - frame.AbsolutePosition.Y) end end) ClearButton.MouseButton1Click:Connect(function() for i, q in pairs(frame:GetChildren()) do if q.Name == "Dot" then q:Destroy() end end end) color = Color3.fromRGB(0, 0, 0) dot.BackgroundColor3 = color RedButton.MouseButton1Click:Connect(function) color = Color3.fromRGB(0, 0, 0) local color = Color3.fromRGB(255, 0, 0) end)
syntax errors
you don’t need to bracket dot.BackgroundColor3 = color otherwise it may break
2, last function loop opening is lacking an opening bracket after function [ (function() ]
edit: my bad issue 1 is already fixed