How to make a Hat Giver On Roblox Studio

Опубликовано: 25 Октябрь 2024
на канале: StudioTutorialzYT
17,258
321

Hello everyone! I hope you all understood and enjoyed this video! If you have any suggestions or questions please comment down below and I'll try my best to answer it! Thank you all for 178 SUBS! Stay safe and have a great day/night!

Baii! 💗

Script:

debounce = true
function onTouched(hit)
if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
debounce = false
h = Instance.new("Hat")
p = Instance.new("Part")
h.Name = "Tophat"
p.Parent = h
p.Position = hit.Parent:findFirstChild("Head").Position
p.Name = "Handle"
p.formFactor = 0
p.Size = Vector3.new(2, 1, 1)
p.BottomSurface = 0
p.TopSurface = 0
p.Locked = true
script.Parent.Parent.Hat.Mesh:clone().Parent = p
h.Parent = hit.Parent
h.AttachmentPos = Vector3.new(0, 0.3, 0)
script.Parent.BrickColor = BrickColor.new("Bright red")
wait(5)
debounce = true
script.Parent.BrickColor = BrickColor.new("Bright blue")
end
end

script.Parent.Touched:connect(onTouched)

#RobloxStudioTutorials