RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script that turns all of your hats into blocks that will will spawn in front off you"
-- local script local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local hatFolder = Instance.new("Folder") hatFolder.Name = "Hats" hatFolder.Parent = character local function spawnBlock(hat) local block = Instance.new("Part") block.Size = Vector3.new(2, 1, 2) block.BrickColor = hat.BrickColor block.Position = character.HumanoidRootPart.Position + character.HumanoidRootPart.CFrame.LookVector * 5 block.Parent = workspace end for _, accessory in pairs(character:GetChildren()) do if accessory:IsA("Accessory") then local hat = accessory.Handle hat.Parent = hatFolder spawnBlock(hat) end end