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: Making a gun

Previous Thread :: Next Thread 
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:05 PM
I want to make a NON ray casting gun, something like the rocket launcher

But there are so many variables in it I don't really understand how it makes the rocket go to the place the player pointed

Help?
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
11 Apr 2013 06:06 PM
Mouse.Target
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:08 PM
@Btft
I know, but that doesn't help me make the bullet go to it
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:10 PM
You could use any of the BodyMovement objects. I've been using BodyVelocity lately for my guns, but you do what you want.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:11 PM
@Roy
I tried all of them, they either don't move (Maybe I don't know how to use them) or go different speeds depending on how far you click or make a artch not go straight to it, or always fire one way, not to the pointing place
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:16 PM
local cframe = CFrame.new(tool.Handle.Position,mouse.hit.p)

local speed = INTSPEEDHERE

local wahtUwant =
tool.Handle.Position+(cframe.lookVector*speed)
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:27 PM
local wahtUwant =
tool.Handle.Position+(cframe.lookVector*speed)


Wut
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:30 PM
What you no understand? Plug dat crap in for velocity and make maxTorque really high k?
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:30 PM
For what?

Body positon?

Body force?

I DUN'T KNUW
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:32 PM
oh sorry my bad k? bodyvelocity is what i use
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:40 PM
r u trolin me?

It makes them fly not go to the place you aim


script.Parent.Equipped:connect(function(Mouse)
Mouse.Button1Down:connect(function()
Bullet = Instance.new("Part")
Force = Instance.new("BodyVelocity")

local cframe = CFrame.new(script.Parent.Handle.Position,Mouse.hit.p)

local speed = 1

local wahtUwant =
script.Parent.Handle.Position+(cframe.lookVector*speed)

Force.velocity = wahtUwant


Force.Parent = Bullet
Bullet.CFrame = script.Parent.Handle.CFrame
Bullet.FormFactor = "Custom"
Bullet.Size = Vector3.new(1,1,1)
Bullet.Parent = Workspace

end)
end)


Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:44 PM
Make teh speed like 100 and make the max property liek Vector3.new(120000,12000,12000) and btw no trolls i promise
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:47 PM
It kinda works, is there a way to make it fire a little more straight?
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:48 PM
plox what? it should fire straight.... which way is it going? up/down? right/left?
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:49 PM
Kinda to the left
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:51 PM
idk why that would happen, maybe uneven max property... the x y and z props need to be equal to go even. it works for me, it might be an illusion.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:53 PM
Try it

script.Parent.Equipped:connect(function(Mouse)
Mouse.Button1Down:connect(function()
Bullet = Instance.new("Part")
Force = Instance.new("BodyVelocity")

local wahtUwant =
script.Parent.Handle.Position+(CFrame.new(script.Parent.Handle.Position,Mouse.hit.p).lookVector*100)

Force.velocity = wahtUwant
Force.maxForce = Vector3.new(120000,12000,12000)

Force.Parent = Bullet
Bullet.CFrame = script.Parent.Handle.CFrame
Bullet.FormFactor = "Custom"
Bullet.Size = Vector3.new(1,1,1)
Bullet.Parent = Workspace

end)
end)
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 06:54 PM
LOL sorry bro dats all my fawlt! change dis

Force.maxForce = Vector3.new(120000,12000,12000)

to dis

Force.maxForce = Vector3.new(120000,120000,120000)

k tanks bai????
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 06:58 PM
Closer but nu :c
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 07:00 PM
still goes toooooooooo left? dats weird, sorry idk whats wrong
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 07:01 PM
LOL its fun to shoot the base and watch dem bounce :3
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 07:02 PM
dats prolly a problem. im sorry to say but there is no way to fix that evar and if somebody tells you to change the CanCollide prop to false tell them you will not let them corrupt you and then just delete your script k?
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 07:11 PM
nuuu have it remove teh bullet on touch nob
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
11 Apr 2013 07:12 PM
bullet.Touched:connect(function()
bullet:Destroy()
end)
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
11 Apr 2013 07:14 PM
I know how lol I was just saying that was how to fix it
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