Advertisement
ColdSpecs

fr

Jun 24th, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local Workspace = game:GetService("Workspace")
  2.  
  3. local preferredSize = Vector3.new(13, 13, 13)
  4.  
  5. local function CreateHighlight(part)
  6. local highlight = Instance.new("Highlight", part)
  7. highlight.OutlineColor = Color3.fromRGB(255, 0, 0)
  8. highlight.FillTransparency = 0.5
  9. return highlight
  10. end
  11.  
  12. local function ResizeAndHighlightHead(head)
  13. if head:IsA("BasePart") and head.Name == "Head" then
  14. head.Size = preferredSize
  15. CreateHighlight(head)
  16. end
  17. end
  18.  
  19. Workspace.DescendantAdded:Connect(function(descendant)
  20. ResizeAndHighlightHead(descendant)
  21. end)
  22.  
  23. -- Initial scan for any heads already in the workspace
  24. for _, part in ipairs(Workspace:GetDescendants()) do
  25. ResizeAndHighlightHead(part)
  26. end
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement