Bug with weld/ragdoll

You can write your topic however you want, but you need to answer these questions:

  1. I wanna try make a spin script, but if you touch the spike welded to it, it also welds your torso

  2. I’ve got basically everything to work, except that the limbs are delayed with it D:

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

the script

–Variables–
local Brick = script.Parent
local Cooldown = false
local bloodpart = script.Parent.Blood
local sound = bloodpart:WaitForChild(“SOUND”)

local bl1 = script.Parent.Blood_Side1
local bl2 = script.Parent.Blood_Side2
local bl3 = script.Parent.Blood_Side3
local bl4 = script.Parent.Blood_Side4
local bl5 = script.Parent.Blood_Top

–Code–
local function PlayerTouched(Part)
local Parent = Part.Parent
local player = game.Players:GetPlayerFromCharacter(Parent)
if player then
local root = Parent:FindFirstChild(“HumanoidRootPart”)
local torso = Parent:FindFirstChild(“Torso”)
local hum = Parent:FindFirstChildOfClass(“Humanoid”)
if root and torso and hum then
root.CFrame = Brick.CFrame * CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(70), 0, 0)
torso.CFrame = root.CFrame

		root.Anchored = false
		torso.Anchored = false
		local weld1 = Instance.new("WeldConstraint")
		weld1.Part0 = Brick
		weld1.Part1 = root
		weld1.Parent = Brick

		local weld2 = Instance.new("WeldConstraint")
		weld2.Part0 = Brick
		weld2.Part1 = torso
		weld2.Parent = Brick


		local weld2 = Instance.new("WeldConstraint")
		weld2.Part0 = Brick
		weld2.Part1 = torso
		weld2.Parent = Brick

		Brick.CanTouch = false
		bloodpart.EFF_1.Enabled = true
		bloodpart.EFF_2.Enabled = true
		sound:Play()

		local decal1 = Instance.new("Decal", torso)
		decal1.Texture = "http://www.roblox.com/asset/?id=524781377"
		decal1.Face = Enum.NormalId.Front

		local decal2 = Instance.new("Decal", torso)
		decal2.Texture = "http://www.roblox.com/asset/?id=524781377"
		decal2.Face = Enum.NormalId.Back

		bl1.Transparency = 0
		bl2.Transparency = 0
		bl3.Transparency = 0
		bl4.Transparency = 0
		bl5.Transparency = 0
		hum.Health = 0

		wait(7)


		sound:Stop()
		bloodpart.EFF_1.Enabled = false
		bloodpart.EFF_2.Enabled = false
		Brick.CanTouch = true

		for _, weld in ipairs(Brick:GetChildren()) do
			if weld:IsA("WeldConstraint") and (weld.Part1 == root or weld.Part1 == torso) then
				weld:Destroy()
			end
		end
	end
end

end

Brick.Touched:Connect(PlayerTouched)
–I edited over a killbrick from the toolbox as a base

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

(idk why the script got cut in half, mb :sob: )

The spin is getting delayed due to latency between the server and the clients. You could do the welding separately on every client, which should fix the issue.

1 Like

okay, thank you. I will try that :stuck_out_tongue: