Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make the player's body parts turn transparent when killed?

 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

2 comments

0

While im not going to make a script, i will say that literally everything here is wrong. You even spelled transparency wrong. Please try this again.

0

lol

2 answers

✓ Accepted answer

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)    

4 comments

0

yo hoold up

0

ok im just gonna include dis anyway ik dis has been answered.

0

???

0

What do you mean?

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)

8 comments

0

why do you posted same script?

0

its not the same its altered a bit and it destroys insteand of turning parts invisible that way its more effective

0

instead*

0

lol

0

-- Added one line -- more effective

0

He wanted to change transparency(not to delete the parts inside of character)

0

im aware, just wanted to point this out

0

not everything needs to be on point, im also not saying that this is better or anything

This discussion is preserved as it was. New answers, comments, and votes are closed.