So i been working with this script:
local deb = false local plr = game.Players.LocalPlayer local sb = Instance.new("SelectionBox") local spl = Instance.new("SelectionPartLasso") script.Parent.Selected:connect(function(mouse) if mouse == nil then return end sb.Color = BrickColor.new("Bright red") spl.Color = BrickColor.new("Bright red") mouse.Button1Down:connect(function() if mouse.Target and mouse.Target:IsA("BasePart") and not mouse.Target.Locked then if deb == false then deb = true local e = Instance.new("Explosion", game.Workspace) e.BlastPressure = 0 e.BlastRadius = 3 e.Position = mouse.Target.Position mouse.Target:Destroy() sb.Adornee = nil sb.Parent = nil spl.Part = nil spl.Humanoid = nil spl.Parent = nil wait() deb = false end end end) mouse.Move:connect(function() if mouse.Target and mouse.Target:IsA("BasePart") and not mouse.Target.Locked then sb.Adornee = mouse.Target spl.Part = mouse.Target if plr.Character and plr.Character:findFirstChild("Humanoid") then spl.Humanoid = plr.Character.Humanoid spl.Parent = plr.Character sb.Parent = plr.Character end else sb.Adornee = nil sb.Parent = nil spl.Part = nil spl.Humanoid = nil spl.Parent = nil end end) end) script.Parent.Deselected:connect(function() sb.Adornee = nil sb.Parent = nil spl.Part = nil spl.Humanoid = nil spl.Parent = nil end)
I am trying to make it so the lasso (the line that connects the player to the block) stays 5 seconds after they click, i've tried the wait(5) but doesn't work.... Please help?