So, I am testing and figuring out a very simple blood effect. (This is my first time doing this so bear with me.) Basically, a player gets hit in a limb, and blood squirts out. Because this is my first time doing this, i was just playing around, and I ended up welding a part that has a particle effect in it to the player’s limb. The issue is, it kind of rotates the player and anchors it until its destroyed.
[WARNING: BLOOD EFFECTS]
I imagine that this is because of the part and weld inside of the players limb, but i have no idea how else i would do it.
here is the script i wrote
local players = game:GetService("Players") script.Parent.Touched:Connect(function(hit) local randomSplatter = math.random(1,3) print(randomSplatter) local bloodPart = nil if randomSplatter == 1 then bloodPart = game.ServerStorage.bloodEmitterSmall elseif randomSplatter == 2 then bloodPart = game.ServerStorage.bloodEmitterMedium elseif randomSplatter == 3 then bloodPart = game.ServerStorage.bloodEmitterLarge end print(hit.Name) local player = players:GetPlayerFromCharacter(hit.Parent) if hit.Parent:WaitForChild("HumanoidRootPart") then if hit.Name == "Head" or "Torso" or "Right Arm" or "Left Arm" or "Right Leg" or "Left Leg" and not "BrownStetson"then local sound = game.ServerStorage["Big Blood Damage 1"]:Clone() sound.Parent = hit sound:Play() local bloodSplatter = bloodPart:Clone() bloodSplatter.BloodParticles.Enabled = true bloodSplatter.Parent = hit bloodSplatter.Position = hit.Position --print(hit.Name) --print(hit.Position) local weld = Instance.new("Weld", workspace) weld.Part0 = bloodSplatter weld.Part1 = hit if hit.Parent.Humanoid then if hit.Parent.Humanoid.Health > 70 then wait(0.6) print("health above 70") elseif hit.Parent.Humanoid.Health <70 then wait(0.8) print("health less than 70") elseif hit.Parent.Humanoid.Health <20 then wait(2) print("health less than 20") else wait(0.6) end end bloodSplatter:Destroy() sound:Destroy() end end end)
if anyone could explain to me why this is happening, and give me tips on how else i could do this and and on other things, that would be amazing