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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Gun script error

Previous Thread :: Next Thread 
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 03:45 PM
local Player = Game.Players.LocalPlayer
local char = Player.Character

function GetBullet()
local p = Instance.new("Part")
p.FormFactor = "Custom"
p.Size = Vector3.new(.25,.25,4)
p.BrickColor = BrickColor.Black()
Instance.new("BodyVelocity", p)
return p
end

script.Parent.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
local mH = mouse.Hit
local bullet = GetBullet()
bullet.CFrame = script.Parent.Handle.CFrame * CFrame.new(char.Torso.CFrame.lookVector * 4)
bullet.CFrame = CFrame.new(bullet.Position, mH.p)
bullet.BodyVelocity.velocity = bullet.CFrame.lookVector * 300
bullet.Touched:connect(function(hit)
local explosion = Instance.new("Explosion")
explosion.Position = bullet.Position
bullet:Destroy()
end)
end)
end)

Can someone tell me why this won't work?
Report Abuse
secretidagent is online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
02 Feb 2014 03:45 PM
tl;dr

Whats the output?
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 03:47 PM
Nothing outputs... at all
And don't come here to tl;dr
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 03:53 PM
Bump
Report Abuse
secretidagent is online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
02 Feb 2014 03:54 PM
I can tl;dr if I want. I am an active member of this forum. Do you even know what tl;dr means? You obviously dont. You probably just think its something people say for the heck of it.
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 03:57 PM
I am not stupid and it isn't helpful to come and just tl;dr
(Means too long; didn't read)
I actually want to know what is wrong
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 04:03 PM
Bumpy
Report Abuse
brightstorm603 is not online. brightstorm603
Joined: 10 Apr 2010
Total Posts: 6807
02 Feb 2014 04:03 PM
Read the output, that will tell you what's going wrong.
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 04:04 PM
There is nothing in the output. Just nothing fires
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 04:08 PM
Can no one help???
Report Abuse
brightstorm603 is not online. brightstorm603
Joined: 10 Apr 2010
Total Posts: 6807
02 Feb 2014 04:10 PM
Use a different free model.
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 04:10 PM
I made it... wtf is wrong with you
Report Abuse
awesom914 is not online. awesom914
Joined: 06 Mar 2011
Total Posts: 4222
02 Feb 2014 04:18 PM
Yep I can't find anything wrong with it... there is nothing wrong yet it doesn't fire... WTF ROBLOX
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