Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

how t make fireball roblox or lua

local Player = game.Players.LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local ammo = 1
local Mouse = Player:GetMouse()  -- NEW VARIABLE

local x = Instance.new("Part")
    x.BrickColor = BrickColor.new("Maroon")
    x.Shape = "Ball"
    x.Material = "Neon"
    x.TopSurface = "Smooth"
    x.BottomSurface = "Smooth"
    x.Anchored = false
    x.CanCollide = true
    x.Transparency = 0.5
    x.Size = Vector3.new(3,3,3);

local y = Instance.new("Fire")
    y.Size = 15
    y.Heat = 5




Mouse.Button1Down:connect(function() --DETECTS CLICK/TAP

 local animation = Instance.new("Animation")
                animation.AnimationId = "http://www.roblox.com/asset/?id=855830361"
    local humanoid = script.Parent:WaitForChild('Humanoid')
                humanoid:LoadAnimation(animation):Play()
  wait(1.5)

if ammo == 1 then
        local cl = x:Clone()  
        local cly = y:Clone()
        local v = Instance.new("BodyVelocity")
                v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
                v.Velocity = Player.Character.UpperTorso.CFrame.lookVector * 60
                v.Parent = cl
                cly.Parent = cl
                cl.Parent = game.Workspace 
                cl.CFrame = Player.Character.UpperTorso.CFrame * CFrame.new(0,1,-5)
                ammo = 0
                game.Debris:AddItem(cl, 4)
                wait(2)
                ammo = 1
        end                          

end)




-- THIS IS FOR CLICKING E

game:GetService("UserInputService").InputBegan:connect(function(input)
    if input.KeyCode == Enum.KeyCode.E then

    local animation = Instance.new("Animation")
                animation.AnimationId = "http://www.roblox.com/asset/?id=855830361"
    local humanoid = script.Parent:WaitForChild('Humanoid')
                humanoid:LoadAnimation(animation):Play()
  wait(1.5)

if ammo == 1 then
        local cl = x:Clone()  
        local cly = y:Clone()
        local v = Instance.new("BodyVelocity")
                v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
                v.Velocity = Player.Character.UpperTorso.CFrame.lookVector * 60
                v.Parent = cl
                cly.Parent = cl
                cl.Parent = game.Workspace 
                cl.CFrame = Player.Character.UpperTorso.CFrame * CFrame.new(0,1,-5)
                ammo = 0
                game.Debris:AddItem(cl, 4)
                wait(2)
                ammo = 1
        end                                                             
    end
end)

Comment

PREVIOUS NEXT
Code Example
Typescript :: Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead in React/ant design [antd] 
Typescript :: run a code only once when two of the same gameobjects collide 
Typescript :: import validator adonisjs 5 
Typescript :: file attachements contac form 7 
Typescript :: youtube comments scrape r 
Typescript :: how to find out the amount of ints in c++ 
Typescript :: Simple code example of adding two numbers in typescript 
Typescript :: What do HTTP requests and responses look like? 
Typescript :: when should you stop testing 
Typescript :: mui icons slow compile time 
Typescript :: postgresql geojson points distance and typeorm 
Typescript :: typescript get string value of enum 
Typescript :: require illuminate/console ^8.42|^9.0 - found illuminate/console[v8.42.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require. 
Typescript :: input adresse ville automatique 
Typescript :: how to create total possible sub sets of a list python 
Typescript :: what are the parts of an array called 
Typescript :: see all github issue comments i made site:stackoverflow.com 
Typescript :: after effects how to parent only one property 
Typescript :: language 
Typescript :: how to get remainder in typescript 
Typescript :: how to implement read more and readless in angular 
Typescript :: how many elements can be stored in an array 
Typescript :: sum of bits calculator 
Typescript :: extracting digits from a number in c++ 
Typescript :: loading assets in ionic react 
Typescript :: Use AuthGuard with gRPC Metadata 
Typescript :: bibtex remove brackets in note field 
Typescript :: Return first k terms from vector 
Typescript :: send tcp packets to kubernetes node 
Typescript :: TypeError: agent_go() takes 0 positional arguments but 1 was given 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =