Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

ugh I never know how to get this to work?

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

✓ Accepted answer
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.

1 comment

0

little confusing but i went around thanks .3.

This discussion is preserved as it was. New answers, comments, and votes are closed.