Final Code - Killing the Player:
- local lava = script.Parent
- local function killPlayer(otherPart)
- local partParent = otherPart.Parent
- local humanoid = partParent:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Health = 0
- end
- end
- lava.Touched:Connect(killPlayer)
Final Code - Flading Platform:
- local platform = script.Parent
- local isTouched = false
- local function fade()
- if not isTouched then
- isTouched = true
- for count = 1, 10 do
- platform.Transparency = count / 10
- wait(0.1)
- end
- platform.CanCollide = false
- wait(3)
- platform.CanCollide = true
- platform.Transparency = 0
- isTouched = false
- end
- end
- platform.Touched:Connect(fade)
Comments
Post a Comment