Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Extremely weird happenings..?

Asked by 10 years ago

I'm making a gun, but I'm making a third person game so I dont need to shoot on the Y axis, its suppose to stay the same as the torso. This works fine when you shoot it on auto. for example: fire() -- dont work fire() -- works

anther example: fire() -- dont work wait(60/rpm) fire() -- works another example:

fire() -- dont work wait(1) fire() -- dont work

(by dont work I mean it shoots the the right) When you shoot it, the first it it shoots to the right for some reason, always, it shoots directly right of the character's gun

workspace:FindPartOnRayWithIgnoreList(Ray.new(barrel.CFrame.p,(Vector3.new(mouse.Hit.X,torso.Position.Y,mouse.Hit.Z)-barrel.CFrame.p).unit*999),ignore)

(FULL CODE) http://pastebin.com /sunrjtQa

I HAVE IT HERE AT: http://www.roblox.com/Non-Generic-zombie-fighting-game-place?id=172950063

Can anyone help me with this? I have no idea what's going on..

http://imgur.com/SAFDuU7

If you take a look at the full code, in the fire() function you will see some prints()s, they the name of the part the person hit, 1, and 2, when it doesnt work right, it says terrain, and only prints 1. When you turn to your left so you are facing perpendicular to another person, you can hit them.

0
Are there any errors when you test this? BlueTaslem 18071 — 10y
0
If you take a look at the full code, in the fire() function you will see some prints()s, they the name of the part the person hit, 1, and 2, when it doesnt work right, it says terrain, and only prints 1. When you turn to your left so you are facing perpendicular to another person, you can hit them. kingmatt2 15 — 10y
0
Can someone please tell me any ideas? kingmatt2 15 — 10y

Answer this question