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

Why Does My Hat Instance All Over The Place?

Asked by 3 years ago

I have a hat giver script that places a hat on a character when you touch a brick. It instances the part, and it works all fine, except for the fact that the position of the hat isn't consistent.

What I mean by this is that the hat wont always instance exactly where I want it to, it'll just instance a little to the right or a little to the left.

Here's the script:


01 h2.Name = "Vest" 02 p2.Parent = h2 03 p2.Position = torso 04 p2.Name = "Handle" 05 p2.formFactor = 0 06 p2.Size = Vector3.new(1, 1, 1) 07 p2.BottomSurface = 0 08 p2.TopSurface = 0 09 p2.Locked = true 10 game.Workspace.Hats.Ammovest:clone().Parent = p2 11 h2.Parent = hit.Parent 12 h2.AttachmentForward = Vector3.new (0, 0, 1) 13 h2.AttachmentPos = Vector3.new(0, -0.871, 0.768) 14 h2.AttachmentRight = Vector3.new (-1, 0, 0) 15 h2.AttachmentUp = Vector3.new (0, 1, 0) 16 p2.Position = p2.Position + Vector3.new(0.5,-3,0.82)

Answer this question