This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Workspace - Part - Script | |
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) |
Reference : https://developer.roblox.com/en-us/onboarding/fading-trap/2
'Roblox' 카테고리의 다른 글
[Roblox] 플레이어 장착 도구 (Tool) (0) | 2021.09.06 |
---|---|
[Roblox] 닿으면 플레이어 HP 회복되는 파트 (Part that restores player HP when touched) (0) | 2021.09.05 |
[Roblox] 리더보드에 플레이어 점수 설정 (Set player score on leaderboard) (0) | 2021.09.05 |
[Roblox] 닿으면 플레이어 죽이는 파트 (Part that kills the player when touched) (0) | 2021.09.05 |
[Roblox] 사라졌다가 나타나는 파트 (Part that disappears and appears) (0) | 2021.09.05 |