I am making a camping game but i want parts or models or npc to appear using a script that starts with wait()
How do i make a script that makes things appear after i put wait() in the script?
2 answers
*Self-explanatory script: *
You may ask how to change multiple parts so that it will appear within wait(), I will answer that right now. In order to change multiple parts, you would use the :GetChildren() instance and call this instance using a generic for loop which looks like this for _, test in pairs() do. BUUUUT don't woorrryyyyy, you can just copy and paste this script in all the parts you want to appear.
script.Parent is the same as saying game.workspace.PartName; it's way quicker!
when you put -- in a script it means you can put comments, good for organizing codes!
local time = 5 is just a local variable, meaning it contains something. so you can say print(time+time) which would give you 10 because 5 + 5 is 10.
local time = 5 -- change "5" to any number, btw it's in seconds so it would be 5 seconds
script.Parent.Transparency = 1 -- 1 means it's completely transparent
script.Parent.CanCollide = false -- this basically means that, well you can go through the block. Do you want an invisible block that you can collide? (meaning you can stand on it, it'd be like you're floating lol)
wait(time) -- remember since local time is a variable it uh means that it will wait whatever you put in time, so if you put 5 in local time, it will be 5 seconds. by the way local time is like on the top of the script if you can't find it.
scrript.Parent.Transparency = 0 -- 0 means it's completely visible.
script.Parent.CanCollide = true -- now that the part is visible, you can stand on the part.
local part = workspace.Part
part.BrickColor = BrickColor.new("Really Red")
wait(5)
part.BrickColor = BrickColor.new("New Yeller")
1 comment
-1 for not explaining whatsoever.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
May I ask why are you starting with wait()? This is bad practice
Don’t start with wait, you could make the parts transparent or set their parent to nil or any number of ways to make them appear under your conditions.
I think @Aqil_Whiz means things happening in between the wait like coroutines