So, I was making a loading screen gui for my game, and I put it all on ReplicatedFirst
Now, this part of the script:
local tweenserice = game:GetService("TweenService")
local Assets = game:GetDescendants()
local music = workspace.music --this one
Is causing this???
I really do NOT know what I did wrong, and if I made some stupid mistake, please call me out on it. I’m stuck on this problem for a while now and it’s driving me INSANE.
As the contents of ReplicatedFirst replicate to the client before anything else in the game
This means the music in workspace hasn’t loaded yet because it isn’t inside replicated first. Try putting the music inside replicated first
Any objects that are to be used by a LocalScript in ReplicatedFirst should also be parented to ReplicatedFirst. Otherwise, they may replicate to the client late, yielding the script and negating the benefit of ReplicatedFirst.
local tweenserice = game:GetService("TweenService")
local Assets = game:GetDescendants()
repeat task.wait() until workspace:FindFirstChild("music")
local music = workspace:FindFirstChild("music")
Sounds good. As a heads up, It will have a little wait time. It waits until it can find the music. Shouldn’t be more then a second or 2, but just be aware of that if it does work.