I was going to make a script that, when a player joined, a ClickDetector would be spawned into their torso and when clicked, it would EXPLODE!!! >:D Only problem is, idk how. ;( A person named funzrey told me to make a LocalScript in StarterPack, but I'm a bit confused as to how the code would go. Can someone help me? Thanks! :D I WIL BL0W U UP NUB!
You'll need to place a LocalScript in StarterPack with this code
player = game.Players.LocalPlayer click = Instance.new("ClickDetector", player.Character.Torso) click.MouseButton1Click:connect(function() local explosion = Instance.new("Explosion", player.Character.Torso) end)
If I have any errors, sorry.
This is basically @funzreys, but I did fixed a few things, I added a ) to then end on line 5 because that would give an error, and I changed to function as that was wrong and giving an error too.
player = game.Players.LocalPlayer click = Instance.new("ClickDetector", player.Character.Torso) function onClicked() explosion = Instance.new("Explosion", player.Character.Torso) end player.Character.Torso.ClickDetector.MouseClick:connect(onClicked)
Hope this helps :D