-- Roblox LocalScript: Debug Click-to-Paint local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local LocalPlayer = Players.LocalPlayer local isPaintingEnabled = false -- GUI Creation local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "DebugPainterGui" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") local Frame = Instance.new("Frame") Frame.Size = UDim2.new(0, 160, 0, 80) Frame.Position = UDim2.new(0.05, 0, 0.4, 0) Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) Frame.Active = true Frame.Draggable = true Frame.Parent = ScreenGui local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 10) UICorner.Parent = Frame local ToggleButton = Instance.new("TextButton") ToggleButton.Size = UDim2.new(0.85, 0, 0.6, 0) ToggleButton.Position = UDim2.new(0.075, 0, 0.2, 0) ToggleButton.BackgroundColor3 = Color3.fromRGB(180, 40, 40) ToggleButton.Text = "PAINTER: OFF" ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.TextSize = 14 ToggleButton.Font = Enum.Font.SourceSansBold ToggleButton.Parent = Frame local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(0, 8) ButtonCorner.Parent = ToggleButton -- Remote Finder with Logs local function getPaintRemote() -- Check Backpack tool first since original code used it local tool = LocalPlayer.Backpack:FindFirstChild("Paint") or (LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Paint")) if tool and tool:FindFirstChild("PaintRemote") then print("[Debug] Found PaintRemote in tool!") return tool.PaintRemote end local remote = ReplicatedStorage:FindFirstChild("PaintRemote", true) if remote then print("[Debug] Found PaintRemote in ReplicatedStorage!") return remote end print("[Debug] ERROR: Could not find PaintRemote anywhere!") return nil end ToggleButton.MouseButton1Click:Connect(function() isPaintingEnabled = not isPaintingEnabled if isPaintingEnabled then ToggleButton.Text = "PAINTER: ON" ToggleButton.BackgroundColor3 = Color3.fromRGB(40, 180, 40) print("[Debug] Painter turned ON") else ToggleButton.Text = "PAINTER: OFF" ToggleButton.BackgroundColor3 = Color3.fromRGB(180, 40, 40) print("[Debug] Painter turned OFF") end end) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed or not isPaintingEnabled then return end if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then local mouseLocation = UserInputService:GetMouseLocation() local camera = workspace.CurrentCamera if not camera then return end local ray = camera:ViewportPointToRay(mouseLocation.X, mouseLocation.Y) local raycastParams = RaycastParams.new() raycastParams.FilterType = Enum.RaycastFilterType.Include -- Let's check entire workspace if PaintableMap isn't exact, or filter it local paintableMap = workspace:FindFirstChild("PaintableMap") if paintableMap then raycastParams.FilterDescendantsInstances = {paintableMap} local result = workspace:Raycast(ray.Origin, ray.Direction * 1000, raycastParams) if result and result.Instance then print("[Debug] Clicked part:", result.Instance:GetFullName()) local remote = getPaintRemote() if remote then local randColor = Color3.new(math.random(), math.random(), math.random()) print("[Debug] Firing server with part and color...") remote:FireServer(result.Instance, randColor) end else print("[Debug] Raycast didn't hit anything inside PaintableMap.") end else print("[Debug] ERROR: 'PaintableMap' folder not found in workspace!") end end end)