generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Script shows no error.

Previous Thread :: Next Thread 
V0xels is not online. 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
johnjohncar is not online. johnjohncar
Joined: 22 Aug 2012
Total Posts: 3557
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 is not online. 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 is not online. 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 is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 09:21 PM
bump
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
20 Feb 2014 09:25 PM
yo, wuts camera == to?
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 09:26 PM
camera = game.Workspace.CurrentCamera.CoordinateFrame.lookVector
Report Abuse
noah is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image