how to make your own hat that can be thrown while the hat is still on the head
STEP 1: MAKE YOUR OWN HAT!
1: USE PARTS OR MESH TO MAKE IT
2: Select the main part of the hat that sits on the head and name it Handle (capital 'H' is crucial)
3: If your hat has multiple parts, weld them to the Handle using WeldConstraints
4: Ensure all parts of the hat are Unanchored so it doesn't float when thrown
5: Insert an Attachment inside the Handle and name it HatAttachment. This helps position the hat on the character's head
STEP 2: MAKE IT WEARABLE (WHICH IS OPTIONAL)
1: In the Workspace, insert an Accessory object and name it "CustomHat"
2: Drag your Handle part into the Accessory object
3: Drag the Accessory object into StarterPlayer -> StarterCharacterScripts
NOTE: If the hat doesn't fit right, you can adjust the position of the HatAttachment
STEP 3: SCRIPT THE THROWABLE HAT
1: Insert a Tool object into StarterPack. Name it "ThrowHat"
2: Place your hat's Handle (and all welded parts) inside the tool
3: Add a Script inside the tool and paste the following:
LUA
-- Server Script inside the Tool
local tool = script.Parent
local throwSpeed = 60 -- Adjust speed
local debris = game:GetService("Debris")
tool.Activated:Connect(function()
local character = tool.Parent
local handle = tool:FindFirstChild("Handle")
if handle then
-- Clone the hat to throw
local thrownHat = handle:Clone()
thrownHat.CanCollide = true
thrownHat.Parent = workspace
-- Position at character head
thrownHat.CFrame = character.Head.CFrame * CFrame.new(0, 1, 0)
-- Throw it
local velocity = Instance.new("LinearVelocity")
velocity.Velocity = character.HumanoidRootPart.CFrame.LookVector * throwSpeed + Vector3.new(0, 10, 0)
velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
velocity.Attachment0 = Instance.new("Attachment", thrownHat)
velocity.Parent = thrownHat
-- Remove the hat after 5 seconds
debris:AddItem(thrownHat, 5)
-- Destroy the hat from the player's head (optional)
-- handle.Transparency = 1
end
end)