Game.Workspace = game.Players.LocalPlayer humanoid.game.health -100 then while true do local player. "Head" = Transperancy = 1 local player. "Right Arm" = Transperancy = 1 local player. "Torso" = Transperancy = 1 local player. "Left Leg" = Transperancy = 1 local player. "Left Arm" = Transperancy = 1 local player. "Right Leg" = Transperancy = 1 end
Dude, all your script wrong and I have to code new script myself. Insert a script inside ServerScriptService and type in this
game.Players.PlayerAdded:Connect(function(player) local char = player.Character or player.CharacterAdded:Wait() --gets player's character game.Workspace.ChildAdded:Connect(function(object) --starts when some child added to workspace if object:FindFirstChild("Humanoid") then --checks if that child is player's character local Humanoid = char:WaitForChild("Humanoid") --gets player's character humanoid Humanoid.Died:Connect(function() --starts when player died for _,v in pairs(char:GetChildren()) do --checking all the parts inside of character if v:IsA("BasePart") or v:IsA("Part") then --checking if part is a basepart or part v.Transparency = 1 --set transparency to 1 end end end) end end) end)
this is how mainstream devs(most) do it, ik its answered and u dont need to do anything but i just hope u see this, same place as HaveASip said
workspace.ChildAdded:connect(function(child) local hum = child:FindFirstChild("Humanoid") if hum then hum.Died:connect(function() for i, v in pairs(child:GetChildren()) do if v:IsA("Part") or v:IsA("BasePart") then v:Destroy() end end end) end end)