i was trying to make a Obby, and i made a part where if you would click on it it would not kill you
i'm not really sure what to do at this point as i'm very new to scripting. Heres the code: --// Variables local Part = game.Workspace.PURPLE local Click = game.Workspace.Click
Part.Transparency = 0 Part.CanCollide = true
game.Workspace.PURPLE.ClickDetector.MouseClick:Connect(function(hit) pcall(function() Part.Transparency = 0.6 Part.CanCollide = false Click:Play() hit.Parent.Humanoid:TakeDamage(0) wait(3) hit.Parent.Humanoid:TakeDamage(100) Part.Transparency = 0 Part.CanCollide = true end) end)
i'm not 100% sure what pcall does, but it did work with the damage.
(don't mind the name of the brick lol)

4 comments
Please place all your code in a code block. Thanks.
he needs to take 100 damage to die
if you dont want the player to die then why are u posting here
just dont make the humanoid take damage??