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

Can you help me with my fireball?

Asked by 9 years ago

StarterPack > LocalScript

The Script is shown below: ~~~~~~~~~~~~~~~~~ local player= script.Parent.Parent.Parent local mouse = player:GetMouse() enabled = true

function onKeyDown(key) key = key:lower() if key == "f" and not enabled then --f means fireball fireball = Instance.new("Part") fireball.Shape = "Ball" fireball.BrickColor = BrickColor.new("Really red") fireball.Transparency = 0.3 fireball.TopSurface = "Smooth" fireball.BottomSurface = "Smooth" fireball.CFrame = player.Character.Torso.CFrame CFrame.new(0,0,-5) fireball.Parent = game.Workspace local mesh = Instance.new("SpecialMesh",fireball) mesh.MeshType = "Sphere" local fire = Instance.new("Fire",fireball) fire.Heat = 8 fire.Size = 10 local bv = Instance.new("BodyVelocity") bv.maxForce = Vector3.new(math.huge,math.huge,math.huge) bv.velocity = player.Character.Torso.CFrame.lookVector80 for i = 1,13 do fireball.Mesh.Scale = fireball.Mesh.Scale +Vector3.new(0.1,0.1,0.1) wait() end bv.Parent = fireball fireball.CanCollide = false end end

mouse.KeyDown:connect(onKeyDown)

~~~~~~~~~~~~~~~~~

It is supposed to be a fireball, when you click f on your keyboard it is supposed to shoot fireballs. It doesn't. Someone help please!

0
Please put your code in a code block and include any output you received. Perci1 4988 — 9y

1 answer

Log in to vote
1
Answered by
LevelKap 114
9 years ago

no offense but this is liteally copied code off of a youtube tutorial. Learn to understand these things instead of copying things down exactly.

Ad

Answer this question