Advertisement
Sungmingamerpro13

SelectBoxScript

Dec 16th, 2022 (edited)
1,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.51 KB | None | 0 0
  1. script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
  2.     if not script.Parent:FindFirstChild("SelectionBox") then
  3.         local SelectionBox = Instance.new("SelectionBox")
  4.         SelectionBox.Adornee = script.Parent
  5.         SelectionBox.Parent = script.Parent
  6.         SelectionBox.Color3 = Color3.new(1, 1, 1)
  7.         SelectionBox.Transparency = 0.8
  8.     end
  9. end)
  10.  
  11. script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
  12.     if script.Parent:FindFirstChild("SelectionBox") then
  13.         script.Parent.SelectionBox:Destroy()
  14.     end
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement