I need support for a writing board!

I’m going to make a board that can be written on. I need help for this. I’ve looked everywhere I need to look but can’t find anything about it.I’ve been working for this for a long time.

Problem: I need a board that can be drawn on hover and click.

IMPORTANT NOTE: Only some people will be able to write on the board.
I’ll be happy if you can help me!

This is a decent tutorial (it’s not perfect by any means, but it works):

The main difference would be that you would use a surfaceGUI and check for whether the player is allowed to write on the board (which could be achieved through a couple of simple if statements).

2 Likes

But I want to write on a part, not for GUI. Can this video still help me?

If you use SurfaceGui | Roblox Creator Documentation on the part it uses the same principles.

Doesn’t work for Surface Gui…

I have no idea why it wouldn’t. You just need to replace the UI used in the video with a SurfaceGUI (i.e Parent a SurfaceGUI with an imageUI or frame of your choice to a part).

local Board = workspace.WhiteBoard.SurfaceGui.Board
local mouse = game.Players.LocalPlayer:GetMouse()
local RelativePart = workspace.WhiteBoard.RelativePart

local x
local y
local pos

local pressed = false

mouse.Button1Down:Connect(function()
	pressed = true
end)

mouse.Button1Up:Connect(function()
	pressed = false
end)

mouse.Move:Connect(function()
	pos = mouse.Hit:PointToObjectSpace(RelativePart.Position)
	x = pos.x
	y = pos.y
	if pressed and mouse.Target == workspace.WhiteBoard then
		local dot = Board.Dot:Clone()
		dot.Parent = Board.Dots
		dot.Position = UDim2.new(0, (-x*100)/2, 0, (y*100))
		dot.Visible = true
	end
end)
1 Like

What element is the

you have written?

it’s basically, a part

(30, can you ignore this)

What do you want to say? :face_with_monocle:

it can already tell that it’s a part

It’s a part that you could use to get the relative position of mouse.Hit. This would enable you to apply 3d vectors into 2d space (the frame) more easily. There are probably better methods, but I would be surprised if that didn’t work. I haven’t tested it extensively so it might have flaws.

I found another solution for the problem!

Does it have to be a pen, or can it be text label that I know how.

You’d probably need some type of texture painting thing and for something like that I wouldn’t put it client side