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
 

FE Ray cast gun, need help

Previous Thread :: Next Thread 
Thunder_Bubble is not online. Thunder_Bubble
Joined: 15 Feb 2017
Total Posts: 180
27 Apr 2017 11:00 AM
Hey guys, I've been working on a raycast gun and I looked at the wiki, I'm trying to take this script and make it work with FE,
http://wiki.roblox.com/index.php?title=Making_a_ray-casting_laser_gun

But I'm not sure how to get the mouse location on the server script, anyone know how to get the mouse location from the server script?
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
27 Apr 2017 11:11 AM
send it as as argument
Report Abuse
Thunder_Bubble is not online. Thunder_Bubble
Joined: 15 Feb 2017
Total Posts: 180
27 Apr 2017 11:25 AM
So now I'm getting an error, it "says this mouse is no longer active" so heres where it gives me an error, the line with the ray cast, this is the server script script.Parent.Equipped:connect(function(mouse) script.Parent.Event.OnServerEvent:connect(function() script.Parent.Event.OnServerEvent:connect(shoot) end) function shoot() if Ammo.Value > 0 then if canFire == true then canFire = false Ammo.Value = (Ammo.Value - 1) local ### # ################################## (mouse.Hit.p - tool.BulletStart.CFrame.p).unit * (maxDistance)) local part, position = workspace:FindPartOnRay(ray, player.Character, false, true)
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
27 Apr 2017 11:28 AM
im not really sure what you're trying to do, but for something as simple as the laser gun in the wiki you'll probably just need the ray, the tool's handle, and the ####### ### property
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
27 Apr 2017 11:28 AM
hit property of mouse
Report Abuse
Thunder_Bubble is not online. Thunder_Bubble
Joined: 15 Feb 2017
Total Posts: 180
27 Apr 2017 11:31 AM
script.Parent.Equipped:connect(function(mouse) script.Parent.Event.OnServerEvent:connect(function() script.Parent.Event.OnServerEvent:connect(shoot) end) function shoot() if Ammo.Value > 0 then if canFire == true then canFire = false Ammo.Value = (Ammo.Value - 1) local ### # ################################## (mouse.Hit.p - tool.BulletStart.CFrame.p).unit * (maxDistance)) local part, position = workspace:FindPartOnRay(ray, player.Character, false, true) I'm not sure why this won't post correctly, hopefully this is a lil better
Report Abuse
Thunder_Bubble is not online. Thunder_Bubble
Joined: 15 Feb 2017
Total Posts: 180
27 Apr 2017 11:31 AM
Okay thanks
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