Basically I’m trying to let a player draw something on a canvas, A while loop is too slow as well as mouse.Move and RenderStepped, as covered in this topic: RenderStepped and Mouse.Move both too slow to make a GUI you can draw on?
I’d use the code from that topic, but sadly it wasn’t given out.
How would I get the points to spawn faster and make it correct, or draw a line from point a to point b to make a line for each and every point? Thanks!
My code:
local runService = game:GetService("RunService")
local drawing = false
local mouse = game.Players.LocalPlayer:GetMouse()
while wait() do
if drawing == false then
local p = Instance.new('Frame', script.Parent)
p.AnchorPoint = Vector2.new(.5,.5)
p.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
p.Size = UDim2.new(.01, 0, 0.01, 0)
p.SizeConstraint = Enum.SizeConstraint.RelativeXX
end
end
(All of this horribly written code will be rewritten, just used as a temp placeholder)
Example with mouse speeds: