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 » Club Houses » Clans & Guilds
Home Search
 

Re: making an rcl gun

Previous Thread :: Next Thread 
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:42 PM
Is there any way to make the raycast originate from the tip of the gun rather than in the middle of my arms? The Handle is in the middle of my arms and the Barrel is the part I want the raycast to shoot from (on the end of the gun, the muzzle).

Here's what I see:

local function fire(aim, mouse)

local origin = handle.Position
local distance = (origin-aim).magnitude
local minSpread, maxSpread = -(spread/100)*distance, (spread/100)*distance

I have tried changing "handle.Position" to "script.Parent.Barrel.Position". This works when shooting the gun at anything but an actual person in which it does not work. The gun refuses to shoot and I must hit backspace to reset its functionality.

Night C&G help me
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:45 PM
a
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
25 Oct 2014 11:46 PM
Sure it's possible, but I'm like 90% sure they did that because they had no better way to stop "wallshooting".
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:48 PM
I don't really care if the gun wallshoots or not, I just want to have the gun shoot and be able to hit and damage people from the tip rather than my torso.

I have the first condition met, but it refuses to hit and damage people based on an "origin" change alone.
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:51 PM
b
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:55 PM
c
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
25 Oct 2014 11:56 PM
try a waitforchild idk
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
25 Oct 2014 11:58 PM
remoteevent!!!
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
25 Oct 2014 11:59 PM
Can you explain where to put that and what exactly to type as if you were attempting to explain it to someone with down's syndrome?
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
26 Oct 2014 12:01 AM
while true do wait() end
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
26 Oct 2014 12:04 AM
Where would I put that? Thank you for the help so far
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
26 Oct 2014 12:06 AM
i was joking please never ever put what i just said into any script
Report Abuse
Komnenos is not online. Komnenos
Joined: 25 Jan 2011
Total Posts: 8299
26 Oct 2014 12:08 AM
God damn it thea why you gotta go and do this to me
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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