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

Can someone help me out? idk what i did wrong

Asked by 8 years ago
----- fireball script

local player = script.Parent.Parent
local mouse = player:GetMouse()
enabled = false

function onKeyDown(key)
    key = key:lower()
    if key == "f" and not enabled then --f for 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.lookVector*80
        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)        
0
Please put this inside of a code block. Edit, Highlight the code and press the blue button. Then, explain what the problem is instead of simply pasting your code. Pyrondon 2089 — 8y
0
Edited for code block. Better title needed, title needs to be a one sentence summary of the problem. Please explain what is going on with your code, include errors if there are any, and what your intended result is. M39a9am3R 3210 — 8y

Answer this question