Like in roblox studio, or outside applications you can click your mouse and drag it around and it creates a highlighted square, mine is working really weird, anyone mind telling me how to do it correctly?
plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local mousedown = false
mouse.Button1Down:Connect(function()
mousedown = true
script.Parent.TextLabel.Position = UDim2.new(0,mouse.X,0,mouse.Y)
end)
mouse.Button1Up:Connect(function()
mousedown = false
script.Parent.TextLabel.Size = UDim2.new(0,0,0,0)
end)
mouse.Move:Connect(function()
if mousedown == false then return end
script.Parent.TextLabel.Size = UDim2.new(0,mouse.X,0,mouse.Y)
end) |