Tried another persons script local model = script.Parent local Player = game.Players.LocalPlayer.Character --Get the player's character here function onTouch(part) if Player.Humanoid.Sit == true then if part.Parent:FindFirstChild("Humanoid") ~= nil then part.Parent.Humanoid.Health = 0 end end
function ConnectParts(obj) if obj then if obj:IsA("Part") then obj.Touched:connect(onTouch()) else if #obj:GetChildren() > 0 then for i, v in pairs(obj:GetChildren()) do ConnectParts(v) end end end end end
ConnectParts(model) end
pelase help, Thanks!

1 comment
Please use the Lua formatting for your code. I don't understand this.