local splatterPiece = game.ServerStorage.bloodSplatterBrick:Clone() --creating particle emitter
local weld = Instance.new("ManualWeld") --creating the weld between your body and the part
weld.Part0 = hit.Parent.Torso
weld.Part1 = splatterPiece
weld.Parent = weld.Part0
splatterPiece.Position = hit.Position
splatterPiece.Parent = hit.Parent
hit in our case would be a players body part
i want to position this bloodsplatter piece where the body part is and then weld it to the torso
it is being created and welded to the torso, but not being put in the right position…?
Where is it being positioned? I noticed that when you position it the weld is created
its being positioned to hit
and yes it is after i created the weld but positioning it before hand also didnt work it has the same problem
I’m confused what is the problem if its being positioned to hit
Is that not intended.
yes
but it is not being positioned to hit
hit is the body part (in my case, the right arm)
it is being positioned to the center of my torso
Try this
local splatterPiece = game.ServerStorage.bloodSplatterBrick:Clone()
splatterPiece.Position = hit.Position
splatterPiece.Parent = hit.Parent
local weld = Instance.new("ManualWeld")
weld.Part0 = hit.Parent.Torso
weld.Part1 = splatterPiece
weld.Parent = weld.Part0
Also do you print hit to debug so you know it isnt always choosing Torso as the hit
did it earlier cuz it came to my mind-
no, hit is right arm when right arm touches it (as it should be)
also parenting it before the weld didnt change anything
Is there anything else happening within script any conditionals.
I thought if you parented and positioned before you weld it would of worked cause doing it otherwise is strange cause wouldn’t moving a welded part break the weld
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then --i might need to change this if i dont want it to effect ragdolls but... it destroy dead bodies body parts technically does make sense and since they have infinite health it doesnt matter if damage is dealt or not
print(hit)
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 50 --deals damage dependent on the body part that was hit
local splatterPiece = game.ServerStorage.bloodSplatterBrick:Clone() --creating particle emitter
splatterPiece.Position = hit.Position
local weld = Instance.new("ManualWeld") --creating the weld between your body and the part
weld.Part0 = hit.Parent.Torso
weld.Part1 = splatterPiece
weld.Parent = weld.Part0
splatterPiece.Parent = hit.Parent
if hit.Name ~= "Torso" then --if it's equal to torso, we don't want to destroy it- we want to deal damage, though
--a series of if statements that decide which joint to break dependant on the body part
if hit.Name == "Right Arm" then
hit.Parent.Torso["Right Shoulder"]:Destroy()
end
if hit.Name == "Left Arm" then
hit.Parent.Torso["Left Shoulder"]:Destroy()
end
if hit.Name == "Right Leg" then
hit.Parent.Torso["Right Hip"]:Destroy()
end
if hit.Name == "Left Leg" then
hit.Parent.Torso["Left Hip"]:Destroy()
end
if hit.Name == "Head" then
hit.Parent.Torso["Neck"]:Destroy()
end
end
script:Destroy()
end
end)
full script
everything works perfectly except for the positioning of this piece and the weld
So this is some sort of gun bullet? Serverside
this script is server side
and no its not a bullet but i guess it effectively acts as one might assume a bullet would
weld.Part0 = hit.Parent.Torso
Why not
weld.Part0 = hit.Parent
Because having it on the torso would make it like float and be set only on the torso.
NVM I see you remove the limbs on hit
ill try but i kinda want it to be on the torso
i mean the point of this full script is its like
creating a blood splatter where the joint connection is between your arm and torso
because you lose your arm
either way this doesn’t adjust the position of the piece at all