Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ugh I never know how to get this to work?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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")

-all the part properties-

-

-

end

script.Parent.MouseButton1Click:connect(onClick)

PLEASE help

1 answer

Log in to vote
4
Answered by 8 years ago
local part = Instance.new("Part")

function go()
    --[[

    The part properties

    --]]
end

script.Parent.MouseButton1Click: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.

0
little confusing but i went around thanks .3. Clakker200 5 — 8y
Ad

Answer this question