Advertisement
Sungmingamerpro13

SelectionBox

Feb 25th, 2023
943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.49 KB | None | 0 0
  1. script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
  2.     if not script.Parent:FindFirstChild("SelectionBox") then
  3.         local Selection = Instance.new("SelectionBox")
  4.         Selection.Adornee = script.Parent
  5.         Selection.Parent = script.Parent
  6.         Selection.Color3 = Color3.new(1, 1, 1)
  7.         Selection.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)
  16.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement