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

Why is Raycast hitting player?

Asked by
Jec0be 11
3 years ago
Edited 3 years ago

I made a roblox raycast script and ti damages the person holding the tool even though it is blacklisted. What did I do wrong?

01local gun = script.Parent
02local fireEvent = gun.FireEvent
03local FastCast = require(gun.FastCastRedux)
04local firePoint = gun.Handle.FirePoint
05 
06local bulletsFolder = workspace:FindFirstChild("BulletFolder") or Instance.new("Folder", workspace)
07bulletsFolder.Name = "BulletFolder"
08 
09local bulletsTemplate = Instance.new("Part")
10bulletsTemplate.Anchored = true
11bulletsTemplate.CanCollide = false
12bulletsTemplate.Shape = "Ball"
13bulletsTemplate.Size = Vector3.new(1, 1, 1)
14bulletsTemplate.Material = Enum.Material.Metal
15 
View all 81 lines...

here's the script

Answer this question