I just wanted to try and attempt recreating his game from scratch. (I wanted to do it in SurfaceGui, instead of ScreenGui) But I ran into a problem.
So currently, I use Localscript for this. Localscript is in StarterPack, chalkboard is the part name (in Workspace), inside chalkboard part, there is a SurfaceGui, and inside the SurfaceGui, there is a Frame.
chalkboard = workspace.chalkboard
frame = chalkboard.SurfaceGui.Frame
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
function draw()
if mouse.Target == chalkboard then
while true do
wait()
local mark = Instance.new("Frame", frame)
mark.Size = UDim2.new(0,1,0,1)
mark.Position = UDim2.new(0,mouse.X, 0, mouse.Y)
mark.BackgroundColor3 = Color3.fromRGB(0,0,0)
end
end
end
mouse.Button1Down:connect(draw)
When I execute, it does draw, but how do you get it so that when player clicks on the SurfaceGui, it draws in that spot of the Frame, instead of Mouse position??? Thanks.
