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

How do you use the type of "Fireball" Scripts, with tools?

Asked by 10 years ago

I've been working on a game for a while, and I'm wondering how they make a script, where if you press something, it will make you do tricks, while you're holding a tool. As in the keydown event, but I don't know how it does what it's doing. How does it shoot out the fireball, AND cause damage, at the same time? How does the fireball even appear!?? I'd think it'd be

Instance.new("Randompart",workspace) 

But the problem with that is, the brick won't spawn near the character's hands. It'd spawn somewhere random. How do you do that as well?? I'd think this would be in the functions, as tags because keydown events, trigger functions.

1 answer

Log in to vote
0
Answered by 10 years ago

First you need to put that parts name Ex. Local p = Instance.new("",workspace). second its part not Randompart then you define the part its size ,shape , color ,etc.

local p = Instance.new("part",workspace)
p.Color = "Any color you want"
p.Size  = the size
p.Cancollide = true/false
p.transparency = its transparency
and some others. 

To find the player's hand you need to locate it

local right_arm = vCharacter:FindFirstChild("Right Arm")
if (right_arm ~= nil) then
local joint = right_arm:FindFirstChild("RightGrip")

Im not a scripting expert but i think this would work.

0
thats the only thing i see other than that idk Revenant101 25 — 10y
0
"But the problem with that is, the brick won't spawn near the character's hands. It'd spawn somewhere random. How do you do that as well??" BugQuestioner -4 — 10y
0
Ima edit it Revenant101 25 — 10y
Ad

Answer this question