Hi! I'm new here, but ive been studying this site for a while so I know to not just ask how to script. I've been researching for several months in hopes to make a decent game. Trying to study Lua coding. Hopefully you all are safe and doing well. Anyway-
Let me give you some backstory. The game I want to make requires all players to start in a tube looking object. The bottom part will push the player up into the arena, similar to hunger games. Now I have a script for this already, but the script I've made only allows the tubes to rise with a a button. I would like to make a countdown timer, and once the countdown arrives the types automatically rise. Heres the current script I have... (sorry im new to this so i dont know how to put this like a code in line, can anyone help me with that as well)
Thanks for reading, and helping.
model = game.Workspace.Tubes
script.Parent.ClickDetector:Destroy()
for i=1,646 do
for number, part in pairs (model:GetChildren()) do
if part.Name == "Part" then
part.CFrame = part.CFrame + Vector3.new(0,.2,0)
end
end
wait (0.05)
end
end)

4 comments
Use code blocks
Hello. Please format your code by pressing the Lua button. Your code is impossible to read.
okay fixed it! :)
Use TweenService.