NG5.MouseButton1Down:connect(function() Mob = NG9.Text local Mob1 = game.Lighting[Mob]:Clone().Parent = workspace end)
I put the name of the mob in the textbox, and it doesnt clone.
It's a tad bit annoying.
For starters when using these [] you should always use ' or " around the name as it will find it. Also if this is in a textbutton or image button, use MouseButton1Click instead of Down. I also suggest defining NG9 and NG5.
1 | local NG 5 = --whatever NG5 is |
2 | local NG 9 = --whatever NG9 is |
3 |
4 | NG 5. MouseButton 1 Down:connect( function () |
5 | local Mob = NG 9. Text |
6 | local Mob 1 = game.Lighting [ "Mob" ] :Clone().Parent = game.Workspace |
7 | end ) |