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

Im am haveing trouble with my fireball script can you please fix it?

Asked by 9 years ago

`~~~~~~~~~~~~~~~~~ local player = script.parent.parent local mouse = player:GetMouse() enabled =false

function onKeyDown(key) key = key:lower() if key == "q" and not enabled then --f for fireball enabled = true 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("bodyvalocity") 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 wait(1) enabled = false wait(9) fireball:Destroy() end end

mouse.KeyDown:connect(onKeyDown) ~~~~~~~~~~~~~~~~~ `

Answer this question