|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
| |
|