V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
|
| 20 Feb 2014 09:05 PM |
mouse.KeyDown:connect(function(r) if key == "r" and script.ACTIVE.Value == true then part = Instance.new("Part", Workspace) part.Name = "Fireball" part.Size = Vector3.new(1,1,1) part.Shape = "Ball" part.Transparency = 0.5 part.BrickColor = BrickColor.new("Bright red") part.Position = char["Right Arm"].Position + camera*4 part.Velocity = camera*300 function touch(part) human = part.Parent:FindFirstChild("Humanoid") if human then human.Health = human.Health - 10 part.Touched:connect(touch) end end end end)
Thats the part that doesn't work. No output error, but it's supposed to make a Part but it doesn't even do that. |
|
|
| Report Abuse |
|
|
|
| 20 Feb 2014 09:07 PM |
| Try putting wait(1) or your amount of time between some of the lines of code. |
|
|
| Report Abuse |
|
|
M39a9am3R
|
  |
| Joined: 10 Nov 2012 |
| Total Posts: 1933 |
|
|
| 20 Feb 2014 09:08 PM |
| Well, you didn't define mouse. Is this in a LocalScript? Where is this script Located? |
|
|
| Report Abuse |
|
|
V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
|
| 20 Feb 2014 09:10 PM |
| I forgot to mention, I have all Variables correct in another part of script. |
|
|
| Report Abuse |
|
|
V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
| |
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
| |
|
V0xels
|
  |
| Joined: 30 Mar 2012 |
| Total Posts: 2072 |
|
|
| 20 Feb 2014 09:26 PM |
| camera = game.Workspace.CurrentCamera.CoordinateFrame.lookVector |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 20 Feb 2014 09:38 PM |
player = game:GetService("Players").LocalPlayer mouse = player:GetMouse() active = false char = player.Character camera = game.Workspace.CurrentCamera.CoordinateFrame.lookVector
mouse.KeyDown:connect(function(key) if key == "r" then if active == false then active = true part = Instance.new("Part", Workspace) part.Name = "Fireball" part.Size = Vector3.new(1,1,1) part.Shape = "Ball" part.Transparency = 0.5 part.BrickColor = BrickColor.new("Bright red") part.Position = char["Right Arm"].Position + (camera*4) part.Velocity = camera*300 part.Touched:connect(function(hit) human = hit.Parent:FindFirstChild("Humanoid") if human then human:TakeDamage(10) end end) end active = false end end)
i changed it up a bit so i could test it in a sb, but im sure you can use it still |
|
|
| Report Abuse |
|
|