How would I weld the hat into the players head?
I was told I needed to weld the hat into the players head, although with that I have no actual idea how to weld things (I script GUIs and stuff but not items) How would I do this?
This is my script
01 | local Player = game.Players.LocalPlayer |
03 | local HatsAvailable = { } |
07 | local LeftButton = script.Parent.LeftHat |
09 | local RightButton = script.Parent.RightHat |
11 | for i,v in pairs (game.ReplicatedStorage.ClothingLow.HatsLow:GetChildren()) do |
12 | table.insert(HatsAvailable,v) |
15 | function RemoveCurrentHats() |
16 | for i,v in pairs (Player.Character:GetChildren()) do |
17 | if v.ClassName = = "Accessory" then |
26 | script.Parent.Buying.Value = true |
28 | script.Parent.ItemName.Text = HatsAvailable [ Count ] .Name |
29 | script.Parent.Price.Text = "$" ..HatsAvailable [ Count ] .Price.Value |
30 | local HatTheyBoughtClone = HatsAvailable [ Count ] :Clone() |
31 | HatTheyBoughtClone.Handle.HatAttachment.Position = Player.Character.Head.Position |
32 | HatTheyBoughtClone.AttachmentPos = Player.Character.Head.Position |
33 | HatTheyBoughtClone.AttachmentPoint = Player.Character.Head.CFrame |
34 | Player.Character.Humanoid:AddAccessory(HatTheyBoughtClone) |
37 | script.Parent.LeftHat.MouseButton 1 Click:Connect( function () |
44 | script.Parent.RightHat.MouseButton 1 Click:Connect( function () |
45 | if Count > = #HatsAvailable then |
52 | script.Parent.Parent.Decline.MouseButton 1 Click:Connect( function () |
53 | script.Parent.Parent.Parent:Destroy() |
Like I said no actual idea how to weld anything