I want to make a naruto game but I made fireball jutsu but I want to be able to charge it any ideas? Vvvvvv heres what I got variables function onClick() h = Instance.new("Part")
end
script.Parent.MouseButton1Click:connect(onClick)
PLEASE help
01 | local part = Instance.new( "Part" ) |
02 |
03 | function go() |
04 | --[[ |
05 |
06 | The part properties |
07 |
08 | --]] |
09 | end |
10 |
11 | script.Parent.MouseButton 1 Click:connect(go) -- assuming the scripts parent is a TextButton |
The changes I made and why I made them : First; I made Instance.new("Part")
able to be referred to by using the word "part". This allows you to easily set up the properties of it. Second; I made a function where you can put all of your properties (preferably beginning with part.
). Example: part.Parent = game.Workspace
. Last, I made the function fire when the scripts parent (in this case a TextButton) is clicked.
If my answer helped you, accept and upvote it. If not, please tell me the error message in the comments below.