Published On Nov 8, 2022
Enroll your child in a free award-winning Roblox coding class to learn live online from an expert: https://www.create-learn.us/roblox-co...
Find out how to make a cool fading trap part in Roblox Studio! Your trap will be able to detect when a player walks over it - and if your player isn't lucky they might fall to their doom :)
Code:
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)
If you need help starting your own obby game first, check out this video: • Coding ROBLOX for Kids: Make an Obby ...
👍 Like
✅ Subscribe
Create & Learn is an award-winning STEM program with the mission of providing top-quality Computer Science education to students in grades K-12. All of our classes are held live online and are taught by experienced teachers. We have served 60,000+ students in 50+ countries. All our curricula were developed jointly by tech experts and experienced educators, with a strong focus on developing students’ creativity and critical thinking skills using project and inquiry based learning.
Our classes have been recognized by Minecraft Education, Facebook, HulaFrog, ActivityHero, and more. We run regular free classes and events with speakers from NASA, Google, and other top companies. Join us to find the magic in technology and have fun: https://www.create-learn.us/