My script to where you click a textbutton explodes you doesnt work at all. Can someone help me?
So i made a small script so when you click a button it explodes and when you hover your mouse over over the button it will explode you. The error is: Players.LordKrox.PlayerGui.ScreenGui.TextButton.LocalScript:5: Expected ')' (to close '(' at column 45), got '.', but when i add the parentheses it says:
Player.LordKrox.PlayerGui.ScreenGui.TextButton.LocalScript:4: Expected identifier when parsing expression, got ')'
The Script is:
1 | local Player = game.Players.LocalPlayer |
2 | local ScreenGui = script.Parent |
3 | local TextButton = ScreenGui.Textbutton |
5 | TextButton.MouseButton 1 Down:Connect( function ( Instance.new( "Explosion" , Player)) |
8 | TextButton.MouseButtonHover:Connect( function ( print ( "Click it." )) |
If you could Help that would be great.