iMadez
|
  |
| Joined: 13 Jun 2014 |
| Total Posts: 4 |
|
|
| 27 Jan 2016 09:53 AM |
Player = game.Players.LocalPlayer Mouse = Player:GetMouse()
function onkey(key) key = key:lower() if key == "t" then x = Instance.new("Part",workspace) x.Name = "FireBall" x.Size = Vector3.new(5,5,5) x.Shape = "Ball" Fire = Instance.new("Fire",x) Fire.Heat = 2 Power = Instance.new("BodyVelocity",x) Power.MaxForce = Vector3.new(math.huge, math.huge, math.huge) Power.Velocity = Player.Character.Torso.CFrame.lookVector*200 x.CFrame = Player.Character.Torso.CFrame*CFrame.new(0, 0, -10) end end function OnDamage(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then print("humanoid is true!") for i = 20,100 do hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health -20 wait(0.5) end end end
x.Touched:connect(OnDamage) Mouse.KeyDown:connect(onkey) |
|
|
| Report Abuse |
|
|
| 27 Jan 2016 10:01 AM |
"x.Touched:connect(OnDamage)" The script doesn't know what x is man... Put this inside of your "onkey" function |
|
|
| Report Abuse |
|