Okay, So I'm making a part that fires pretty fast using velocity, Everything's been working fine except for the fact that the part isn't triggering the Touched function that I made, Is there a fix to this or Is there a better way of doing this?
BulletScript.Disabled = false Bullet.PrimaryPart.CFrame = Tool.FireFront.CFrame + Tool.FireFront.CFrame.LookVector * 0.7 Bullet.PrimaryPart.CFrame = CFrame.new(Bullet.PrimaryPart.Position, MousePos) --Bullet.PrimaryPart.Anchored = true Bullet.PrimaryPart.Velocity = Bullet.PrimaryPart.CFrame.LookVector *10*100
The thing that fires the bullet ^
Bullet.Main.Touched:Connect(function(Object) print(Object.Name) local Humanoid = Object.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then local TC = game.Players:FindFirstChild(Object.Parent.Name).TeamColor if TC ~= script.Parent.PrimaryPart.BrickColor then if Object.Name == "Left Leg" or Object.Name == "Right Leg" or Object.Name == "Left Arm" or Object.Name == "Right Arm" then script.Damage.Value = script.Damage.Value / 0.75 Humanoid:TakeDamage(script.Damage.Value) script.Parent:Destroy() elseif Object.Name == "Torso" then Humanoid:TakeDamage(script.Damage.Value) script.Parent:Destroy() elseif Object.Name == "Head" then script.Damage.Value = script.Damage.Value * 0.50 Humanoid:TakeDamage(script.Damage.Value) script.Parent:Destroy() end end elseif Humanoid == nil and Object.CanCollide == true then --WIP script.Parent:Destroy() end end)
The bullet script ^^^ It's really messy, But the bullets going so fast it's not triggering the touched function