So I made this script that a group of parts is copied from Lighting, and is moved to the position where the mouse is at that moment. I may have made it TOTALLY WRONG, and if so I'd like a wiki link (Or if you want to fix it that would be great too) as to how to fix it, or simple instructions. (See below the script for whats not working)
dum=game.Lighting.Dummy
plr=script.Parent.Parent.Parent
mouse=plr:GetMouse()
mouse.Button1Down:connect(function()
h=mouse.Hit
c=dum:Clone()
c.Parent=game.Workspace
nh=h+Vector3.new(0,5,0)
c:MoveTo(Vector3.new(nh))
end)
So far, it clones the dummy, and it appears on click. But it always teleports to the same spot no matter where I click. I assume I may have used Hit or Moveto incorrectly.

3 comments
Edited the final one. You're welcome :)
I feel so stupid haha, thanks.
No problem :)