Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

welding error bad cast?

Asked by 9 years ago
  I was trying to weld this hat on top of my character's head and i got bad cast i never   encountered this error before so some help would be great! 
player=script.Parent.Parent
repeat wait() until player
c=player.Character
h = Instance.new("Hat")
p = Instance.new("Part")
h.Name = "Hat"
p.Parent = h
p.Name = "Handle"
p.formFactor = 0
p.Size = Vector3.new(-0,-0,-1)
p.BottomSurface = 0
p.TopSurface = 0
p.Locked = true 
weld=Instance.new("Weld",h)
weld.Part0=h
weld.Part1=c["Head"]
h.Parent=c
weld.C1=CFrame.new(0,2,0)
0
I got it you can only weld parts not hats. So i welded p but it still does not raise the position of the hat to up 2 studs. threatboy101 2 — 9y

Answer this question