How to make a music synchronized game intro?

I checked on the roblox API Reference,

What’s better between RunService.Heartbeat or RunService.RenderStepped for an intro like this ?

Hi does someone know how TimePosition counts ?
like is 0.001 actually 1 millisecond ?
or it runs on 60hz ?

I made a studio intro for my development studio. In all of our games we have a little intro. The way I did it was I animated it, then put in the song/sounds. I played the game to watch the intro, then made required adjustments. I just played with the audio and animation until everything lined up.

1 Like

Was the animation a video or a series of instructions in a script ?

Series of instructions in a script. I just used tweenservice with some ui gradients.

Oh ok, last question how did you do the timings ? Did you use wait(n) or something else ?
I just need this part lol

I used wait, or made the tween take a certain amount of time.

Oh ok then but did you have problem when using wait() ? I’m trying to be as precise as possible

I used a sound effect, then used wait and tweens with an image label. That was my whole intro.

Oh then i’ll probably need something more precise, but thanks anyway !

1 Like

Ok i’m back, i’m planning to compare the sound instance’s timeposition value with an exact timeposition value, but how could I detect when they’re the same ?

UPDATE: After almost 7 hours of coding and debugging, i’ve finally ‘kind of’ finished that intro! It just needs a little polishing but other than thazt, it’s perfect for me !!!

(Didn’t work via devforum upload): Atmos game intro demo - YouTube

Here’s the code if anyone wants it:

local sound = script.Parent.IntroSong
local loadingFrame = script.Parent.Frame
local animation = script.Parent.Animated
local Thread = require(game.ReplicatedStorage.Modules.CustomWait)

loadingFrame:TweenPosition(UDim2.new(1,0,0,0),"In","Quart",0.5,true)
Thread:Wait(0.5)
script.Parent.Animated.Visible = true
sound.TimePosition = 8.46
sound:Play()
animation.Logo:TweenPosition(UDim2.new(0.032, 0,0.32, 0),"Out","Elastic",2.02,true) -- Logo
Thread:Wait(2.02) -- T1 10.480
animation.A:TweenPosition(UDim2.new(0.278, 0,0.375, 0),"Out","Quint",0.16,true) -- A
Thread:Wait(0.16) -- T2 10.640
animation.t:TweenPosition(UDim2.new(0.441, 0,0.375, 0),"Out","Quint",0.12,true) -- T
Thread:Wait(0.12) -- T3 10.760
animation.m:TweenPosition(UDim2.new(0.536, 0,0.375, 0),"Out","Quint",0.32,true) -- M
Thread:Wait(0.32) -- T4 11.080
animation.o:TweenPosition(UDim2.new(0.691, 0,0.375, 0),"Out","Quint",0.640,true)
animation.s:TweenPosition(UDim2.new(0.796, 0,0.375, 0),"Out","Quint",0.640,true)-- OS
Thread:Wait(0.640) -- T5
script.Parent.Menu.ImageLabel.Tempo.Disabled = false
script.Parent.Animated:Destroy()
script.Parent.Menu.Visible = true

I used this custom wait() modulescript : https://gist.github.com/CloneTrooper1019/538f0ab2541ef98912a2694dd8d274e7

3 Likes

Split the audio into different sound since there is a chance of lag during loading also there are modules that make wait more precise.

1 Like

Thanks but I’ve tested on almost every since case and there’s no problems, I might change it a little but right now i’m too lazy to do it