Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Workspace = game:GetService("Workspace")
- local preferredSize = Vector3.new(13, 13, 13)
- local function CreateHighlight(part)
- local highlight = Instance.new("Highlight", part)
- highlight.OutlineColor = Color3.fromRGB(255, 0, 0)
- highlight.FillTransparency = 0.5
- return highlight
- end
- local function ResizeAndHighlightHead(head)
- if head:IsA("BasePart") and head.Name == "Head" then
- head.Size = preferredSize
- CreateHighlight(head)
- end
- end
- Workspace.DescendantAdded:Connect(function(descendant)
- ResizeAndHighlightHead(descendant)
- end)
- -- Initial scan for any heads already in the workspace
- for _, part in ipairs(Workspace:GetDescendants()) do
- ResizeAndHighlightHead(part)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement