How can I be able to make a script that make a model that appear in a certain of time? For example; lets say that I made a cave and I placed it in lighting. And if it turn night time, then the cave will appear into the map with the position that I placed. How can I do that? Can somebody help me?
This sounds like a job for .Changed and :SetPrimaryPartCFrame
1 | local Time = game.Lighting |
2 | local Model = game.Lighting.Z --- Your Model |
3 |
4 | Time.Changed:connect( function () ---Fires when properties of lighting are changed |
5 | if Time.TimeOfDay = = "14:00:00" then --Desired time |
6 | Model.Parent = game.Workspace -- Place the model in the workspace |
7 | Model:SetPrimaryPartCFrame(CFrame.new( 1 , 10 , 1 )) ---The desired Position of the model |
8 | end |
9 | end ) |
Hope this helps. Be sure to actually SET a primary part (In the properties of the model)