Toxenz
|
  |
| Joined: 22 Nov 2009 |
| Total Posts: 4389 |
|
|
| 11 May 2013 03:07 PM |
| I'm essentially trying to make a headlamp. I'm just using a standard fm hat giver and inserting a spot light into the hat. But when I wear the hat the lgiht gets removed. Any way I could get the light to transefer with it? |
|
|
| Report Abuse |
|
|
|
| 11 May 2013 03:09 PM |
Give us the hat giver script.
Btw, *Lit hat giver |
|
|
| Report Abuse |
|
|
Toxenz
|
  |
| Joined: 22 Nov 2009 |
| Total Posts: 4389 |
|
|
| 11 May 2013 03:13 PM |
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 = "Night Vision Goggles" 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.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0, .1, 0) wait(1) debounce = true end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 11 May 2013 03:16 PM |
insert a spotlight called "SpotLight" in the part and change the script to this
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") light = script.Parent.SpotLight:clone() h.Name = "Night Vision Goggles" p.Parent = h light.Parent = p 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.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0, .1, 0) wait(1) debounce = true end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Toxenz
|
  |
| Joined: 22 Nov 2009 |
| Total Posts: 4389 |
|
|
| 11 May 2013 03:23 PM |
| Still didn't light the one givin to the player. |
|
|
| Report Abuse |
|
|