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 » Scripters
Home Search
 

Re: Gun wont work

Previous Thread :: Next Thread 
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 12:56 PM
Player = game.Players.LocalPlayer
Flame = script.Parent
Ammo = 99999999999999999999999999999999999999999999999999999999999999999999999

function Shoot()
if Ammo > 0 then
Bullet = Instance.new("Part", Workspace)
Bullet.Shape = "Ball"
Bullet.Size = Vector3.new (0.2,0.2,0.2,) <<< the last bracket is red for some reason
Bullet.Transparency = 1
Instance.new("Fire",Flame)
end
end

Flame.Activated:connect(Shoot)
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 01:07 PM
pls
Report Abuse
LuaLlama is not online. LuaLlama
Joined: 25 Jan 2014
Total Posts: 1123
20 Mar 2016 01:09 PM
Remove the last , un the vector3 value
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 01:11 PM
?
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 01:12 PM
oh ok i did that now workspace and bullet is blue
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
20 Mar 2016 01:17 PM
workspace, not Workspace

local Bullet
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 01:18 PM
im following this tutorial: https://www.youtube.com/watch?v=IMnEOwGj9qo
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 01:19 PM
Player = game.Players.LocalPlayer
Flame = script.Parent
Ammo = 99999999999999999999999999999999999999999999999999999999999999999999999

function Shoot()
if Ammo > 0 then
local Bullet = Instance.new("Part", workspace)
local Bullet.Shape = "Ball"
local Bullet.Size = Vector3.new (0.2,0.2,0.2)
local Bullet.Transparency = 1
Instance.new("Fire",Flame)
end
end

Flame.Activated:connect(Shoot)
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
20 Mar 2016 02:27 PM
What's wrong with it now?
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
20 Mar 2016 02:28 PM
Oh duh,

'local' should only be in front of the first Bullet
Report Abuse
jj888jakub1 is not online. jj888jakub1
Joined: 29 May 2012
Total Posts: 25
20 Mar 2016 02:41 PM

Player = game.Players.LocalPlayer
Flame = script.Parent
Ammo = 99999999999999999999999999999999999999999999999999999999999999999999999

function Shoot()
if Ammo > 0 then
local Bullet = Instance.new("Part", workspace)
Bullet.Shape = "Ball"
Bullet.Size = Vector3.new (0.2,0.2,0.2,) <<< the last bracket is red for some reason
Bullet.Transparency = 1
Instance.new("Fire",Flame)
end
end

Flame.Activated:connect(Shoot)


Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 03:29 PM
thx
Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
20 Mar 2016 03:30 PM
wouldnt that ammo return like -2 billion? use math.huge

Player = game.Players.LocalPlayer
Flame = script.Parent
Ammo = math.huge

function Shoot()
if Ammo > 0 then
local Bullet = Instance.new("Part", workspace)
Bullet.Shape = "Ball"
Bullet.Size = Vector3.new (0.2,0.2,0.2,) <<< the last bracket is red for some reason
Bullet.Transparency = 1
Instance.new("Fire",Flame)
end
end

Flame.Activated:connect(Shoot)



y-you monster
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 04:01 PM
the tutorial involves debris but debris doesn't exist anymore, what do i do? replace it with lighting?
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 04:03 PM
oh nvm debris works
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 04:05 PM
Player = game.Players.LocalPlayer
Flame = script.Parent
Ammo = math.huge
mouse = Player:GetMouse()

function Shoot()
if Ammo > 0 then
local Bullet = Instance.new("Part", workspace)
game.Debris:AddItem(Bullet,2)
Instance.new("Fire",Flame)
Bullet.Shape = "Ball"
Bullet.Size = Vector3.new (0.2,0.2,0.2)
Bullet.Transparency = 1
Bullet.CanCollide = false
local v = instance.new("BodyVelocity", Bullet)
Bullet.Cframe = Flame.Handle.Cframe
Bullet.Cframe = Cframe.new (Bullet.Position,mouse.Hit.p)
v.velocity = Bullet.Cframe.lookVector *90
v.Maxforce = Vector3.new(math.huge,math.huge,math.huge)
end
end

Flame.Activated:connect(Shoot)
Report Abuse
skrecher23456 is not online. skrecher23456
Joined: 14 Apr 2012
Total Posts: 986
20 Mar 2016 04:12 PM
where do i put Instance.new("Fire",Flame)?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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