Hihi guys, i wanted to make this post since 2 days ago but haven’t had a time.
I want to make sure that Tween plays after the game is loaded like in “City Life” by Simple Games interactive.
The problem is that game.Loaded:Wait() exists but this is not playing after loaded.
Been searching solutions for awhile and there is no way of achieving this, even though i was suggested to use game:IsLoaded() but it still skips somehow
Do i need to get a remote or am i missing something?
Personally, I would have a loading script that handles the loading of the game. I would have a script inside of replicatedFirst which animates the loading screen and then after all of that is finished fire a remote event to the server to tell it that the client has finished loading and then send a remote back to the client to initiate the tweeting of the camera.
It would look something like this: Loading Finished → Fire Server → Fire Client
I wouldn’t recommend it since everyone loads their game at a different time. Let’s say you are playing on a really old laptop it may take a minute or two to load up compared to playing on a fast one where it may only take a couple of seconds.
You can preload your character, when preloading is done play the tween.
local cp = game:GetService("ContentProvider")
local player = game.Players.LocalPlayer
game.Loaded:Wait()
local character = player.Character
for i,v in pairs(character:GetDescendants()) do
cp:PreloadAsync({v})
end
if game:IsLoaded() and character then
print('player character and the game is loaded!')
end
If you actually want to wait for the whole map to be loaded, then the player should wait longer depending on their wifi speed.
If you are willing to load the whole map then replace (NOT RECOMMENDED)