Erielvictor / Meus-projetos

2 stars 0 forks source link

Colorful trap stairs #7

Open Erielvictor opened 1 year ago

Erielvictor commented 1 year ago
local part = script.Parent

local isTouched = false

local function fade()
    if not isTouched then
        isTouched = true
        part.BrickColor = BrickColor.new(Color3.fromRGB(83, 0, 1))
        for i = 1,10,1 do
            part.Transparency = i/10
            wait(0.1)
        end
        part.CanCollide = false
        wait(3)
        part.CanCollide = true
        part.Transparency = 0
        part.BrickColor = BrickColor.new(Color3.fromRGB(0, 83, 3))
        wait(0.5)
        part.BrickColor = BrickColor.new(Color3.fromRGB(197, 197, 197))
    isTouched = false
    end
end

part.Touched:Connect(fade)

This stair can be used to make a trap or just to make a path that can disappear and reappear