the example is like Miners Haven where you can select multiple parts i thought it was a gui and position and size according to the mouse but this doesn't work
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local gui = player.PlayerGui:WaitForChild("ScreenGui").Frame mouse.Button1Down:Connect(function(down) local MouseCFrame = mouse.Hit.p gui.Position =UDim2.new(MouseCFrame) mouse.Move:Connect(function() gui.Size =UDim2.new(mouse.Hit.p) end) end)
might be doing it wrong, i haven't scripted in a while.
local selectionbox = Instance.new("SelectionBox") selectionbox.Parent = game:GetService('Players').LocalPlayer.PlayerGui local mouse = game.Players.LocalPlayer:GetMouse() mouse.Move:Connect(function() --Detects Mouse Move local part = mouse.Target --Current mouse Target selectionbox.Adornee = mouse.Target --Changes selection box's Adornee to current Target end) --end for {mouse.Move:Connect(function()}
There is an Instance
called SelectionBox
just use that.