How to make my gore system more realistic?

Hello, i’m making a gore shooter-gore game, i got a gun system that works perfectly. there are a few glitches, but they are just miss-named errors which are really easy to fix, it all works, but i was wondering if theres a way to make it more realistic, heres what i mean:

heres the script:

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local DamageToDoIfTheHitIsAPlayer = 0
local remoteEvent = ReplicatedStorage:FindFirstChild("M1911")


remoteEvent.OnServerEvent:Connect(function(player, gunPos, gunOr, mosPos)
	local mouse = player:GetMouse()
	game:GetService("ReplicatedStorage")["M1911 Fire"]:Play()
	local bullet = Instance.new("Part")
	bullet.Position = gunPos
	bullet.Orientation = gunOr
	bullet.Transparency = 1
	bullet.Name = 'Bullet'
	bullet.Parent = game.Workspace
	bullet.Size = Vector3.new(.25, .25, .25)
	bullet.BrickColor = BrickColor.new('Neon orange')
	bullet.Shape = Enum.PartType.Block
	bullet.CanCollide = false

	local speed = 500
	bullet.CFrame = CFrame.new(gunPos, mosPos)
	bullet.Velocity = bullet.CFrame.lookVector * speed

	bullet.Touched:Connect(function(otherPart) 
		local humanoid = otherPart.Parent:FindFirstChild('Humanoid')
		if humanoid and humanoid.Parent.Name ~= player.Name then
			local plr = game.Players:GetPlayerFromCharacter(otherPart.Parent)
			if humanoid.Health > 0 then
				if otherPart.Name == "Left Arm" then
					humanoid:TakeDamage(25)
					local LeftArmOfThePlayer = otherPart
					LeftArmOfThePlayer.Transparency = 1
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm").Color = LeftArmOfThePlayer.Color
					local FakeArm2 = LeftArmOfThePlayer:FindFirstChild("TopArm")
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm").Transparency = 0
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm"):FindFirstChild("DamagedArea").Transparency = 0
					FakeArm2:FindFirstChild("DamagedArea"):FindFirstChild("WeldToOtherArms"):Destroy()
					FakeArm2.Parent = workspace
					LeftArmOfThePlayer:FindFirstChild("WeldConstraint"):Destroy()
					FakeArm2.CFrame =  CFrame.lookAt(FakeArm2.Position,player.Character:FindFirstChild("Head").Position)
					FakeArm2:FindFirstChild("DamagedArea").CFrame =  CFrame.lookAt(FakeArm2:FindFirstChild("DamagedArea").Position,player.Character:FindFirstChild("Head").Position)
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm"):FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Enabled = true
					wait(2.44)
					FakeArm2:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(1)
					wait(3)
					FakeArm2:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(0)
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm"):FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Enabled = false
					otherPart.Parent:FindFirstChild("Head"):Destroy()
				elseif otherPart.Name == "Right Arm" then
					humanoid:TakeDamage(25)
					local LeftArmOfThePlayer = otherPart
					LeftArmOfThePlayer.Transparency = 1
					otherPart.Parent:FindFirstChild("Right Arm"):FindFirstChild("TopArm").Color = LeftArmOfThePlayer.Color
					local FakeArm = LeftArmOfThePlayer:FindFirstChild("TopArm")
					otherPart.Parent:FindFirstChild("Right Arm"):FindFirstChild("TopArm").Transparency = 0
					otherPart.Parent:FindFirstChild("Right Arm"):FindFirstChild("TopArm"):FindFirstChild("DamagedArea").Transparency = 0
					FakeArm:FindFirstChild("DamagedArea"):FindFirstChild("WeldToOtherArms"):Destroy()
					FakeArm.Parent = workspace
					FakeArm:FindFirstChild("WeldConstraint"):Destroy()
					FakeArm.CFrame =  CFrame.lookAt(FakeArm.Position,player.Character:FindFirstChild("Head").Position)
					FakeArm:FindFirstChild("DamagedArea").CFrame =  CFrame.lookAt(FakeArm:FindFirstChild("DamagedArea").Position,player.Character:FindFirstChild("Head").Position)
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm"):FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Enabled = true
					wait(2.44)
					FakeArm:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(1)
					wait(3)
					FakeArm:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(0)
					otherPart.Parent:FindFirstChild("Left Arm"):FindFirstChild("TopArm"):FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Enabled = false
					otherPart.Parent:FindFirstChild("Head"):Destroy()
				elseif otherPart.Name ~= "Head" then
					humanoid:TakeDamage(30)
					local particleEmitter = ReplicatedStorage.Blood:Clone()
					particleEmitter.Parent = otherPart
					bullet:Destroy()
					particleEmitter:Emit()
					wait(1)
					particleEmitter:Destroy()
				elseif otherPart.Name == "Head" then
					humanoid:TakeDamage(100)
					local Head1 = otherPart.Parent:FindFirstChild("Head")
					Head1.Transparency = 1
					Head1:FindFirstChild("face"):Destroy()
					local head = otherPart.Parent:FindFirstChild("Head"):FindFirstChild("FakeHead")
					otherPart.Parent:FindFirstChild("Head"):FindFirstChild("FakeHead").Transparency = 0
					local particleEmitter = ReplicatedStorage.Blood:Clone()
					otherPart.Parent:FindFirstChild("Head"):FindFirstChild("FakeHead"):FindFirstChild("DamagedArea").Transparency = 0
					otherPart.Parent:FindFirstChild("Head"):FindFirstChild("FakeHead").Color = otherPart.Parent:FindFirstChild("Head").Color
					head:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Enabled = true
					head:FindFirstChild("WeldToOtherArms"):Destroy()
					Head1:FindFirstChild("WeldConstraint1"):Destroy()
					head.Parent = workspace
					particleEmitter.Parent = otherPart
					head.CFrame = Head1
					particleEmitter:Emit()
					wait(2.44)
					head:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(1)
					wait(3)
					head:FindFirstChild("Part"):FindFirstChild("ParticleEmitter").Lifetime = NumberRange.new(0)
				end
			end
		end
	end)
end)

I’m not trying to make a gore model for literally each spot on the arm, im trying to achieve this using a script, please help!

also, visual help would be the best!

If you want “bullet holes” or gore effects, you must get the normal and hit position. A touch event will not allow for you to achieve this. I understand you want your bullet to have velocity and approach the target position.

local castResult = workspace:Raycast(gunPos, (mosPos-gunPos).Magnitude * 1000)
--  in your touched event:
if castResult ~= nil and castResult.Hit ~= nil then
     local normal castResult.Hit.Normal
     local hitPos = castResult.Hit.Position
     --make a bulletHole/goreEffect, in this script, I'll assume your variable name is "goreEffect"
     goreEffect.CFrame = CFrame.new(hitPos, hitPos + normal)
end

you could also look into fastcast or making your own module to be more organized as touch event is inaccurate at times.

As concat_nate said, you’ll need to replace your .Touched() event with some form of raycasting. When the client detects a hit, you’ll want to send the part that was hit, the offset from the part, and the part’s normal. A common mistake is that some developers only send where the bullet landed, which results in bullet holes not even connected to the player (due to latency).

For each client, you have them replicate the bullet hole, and since we know what was hit, it’s offset, and what it’s orientation should be, it can be replicated perfectly.

being honest, both replies helped me but i can only solution one, im solution concat_nate’s reply, if thats okay w you TheCraft, thank you guys for helping

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.