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

Whenever I try to make something into a hat, it's rotated oddly. What can I do?

Asked by 6 years ago

Whenever I touch it, it gets equipped but is rotated in such a way that doesn't look right. Is there anyway to rotate or tilt it within the script somehow?

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 = "Helmet" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(2,2,2) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0, 0, 0) wait(5) debounce = true end end

script.Parent.Touched:connect(onTouched)

Answer this question