I created a Script that kills any Humanoid when they touch the Part but I do not know how to set the Player on Fire and turn all of their BodyColors to the color of Black.
script.Parent.Touched:connect(function(hit) if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 end end)
You would have to make a variable making the fire, sparkles, or smoke. This is how you would do it.
particles = Instance.("Fire",hit.Parent.Torso)
The full script would be:
script.Parent.Touched:connect(function(hit) if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 particles = Instance.new("Fire",hit.Parent.Torso) end end)
You can replace fire with Sparkles, Smoke, and ParticleEmitter
(This is in addition to docrobloxman52's answer)
To turn all of the character's parts black, you can iterate over the character's parts:
parts = hit.Parent:GetChildren() for i = 1, #parts do if parts[i]:IsA("BasePart") then parts[i].BrickColor = BrickColor.new("Black") end end
(Regarding your comment) If you wish to access a specific part with a space in the name, you can use :FindFirstChild to make sure it's there, or simply use hit.Parent["Left Arm"] (but that will error if Left Arm doesn't exist). So, if you wanted to change their Left Arm to Red, you might do:
local leftArm = hit.Parent:FindFirstChild("Left Arm") if leftArm then leftArm.BrickColor = BrickColor.new("Bright red") end