Hello, everyone.
I am an new developer and this is my first post,
and I am not native English speaker,
so sorry for any small grammatical mistakes or inappropriate expressions.
Currently I am developing a virtual international school with some classrooms.
Each classroom has blackboard but now it is just a union part and
players cannot draw anything on it.
To let players draw on it, I researched topics here and found scripts with frames.
However, it didn’t work and if possible I want to avoid to use them
because some people reports time lags or crash of the program.
I believe this is technically possible
because I found a drawing game called “Free Draw 2”
in which we can draw freely on the ground smoothly.
I appreciate if someone help me.
Thanks in advance.
As @25darkstar suggested you could use a decal/frame system in this case. If you take a backgroundless image of a dot in the preferred colour you could then replicate that image based on where on the board the player presses. You could achieve this using UserInputService or some kind of pen tool.
For smoother lines rectangular frames could be used with the height being the distance between the start and end point, the width the line thickness and an angle based on those two points until the player stops pressing the mouse button, dots could optionally be used for single clicks or start/end points of the lines
Mouse.Hit is fine for most purposes but UserInputService is better in terms of cross-platform usability, especially when you can achieve the same thing (even if it requires more code).
Thank you for your quick help.
I am impressed how fast you guys replied.
According to your advices,
I got back to focus on Frame idea and restarted the search again.
Today I found another code on YouTube:
(- YouTube)
This works good in StarterGui > ScreenGui folder,
while it does not work in Part > SurfaceGui folder.
Does anyone know the reason?
In both case, the codes are written in LocalScript.