So I was playing around making audio visualizers until I noticed something. The music plays 2 times. I’m not sure what is happening. Maybe a script issue. Maybe lag issues. I don’t know. Here is the video on me noticing it.
Basically when the server loads, the music plays fine. But when the client loads, I think it plays again.
1 Like
Are you using 2 scripts? Also Show me the code you’re using.
This is the 1st one
local frame = script.Parent
local cam = workspace.CurrentCamera
while true do
frame.Size = UDim2.new(0,21,0,math.clamp(script.Parent.Parent.main.PlaybackLoudness*1,1,300))
wait()
game:GetService("TweenService"):Create(frame,TweenInfo.new(0.6,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut,0,false,0),{Size = UDim2.new(0,21,0,2)}):Play()
local camtween = game:GetService("TweenService"):Create(cam, TweenInfo.new(0.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out,0,false), {FieldOfView = math.clamp(script.Parent.Parent.main.PlaybackLoudness*0.05,0,300) + 40})
camtween:Play()
end
And the 2nd
local primary = script.Parent
local model = script.Parent.Parent
local tweenservice = game:GetService("TweenService")
local folderparts = workspace:WaitForChild("Keyframes"):GetDescendants()
while true do
for i,v in pairs(folderparts) do
if v:IsA("BasePart") then
local tween = tweenservice:Create(primary, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false), {CFrame = v.CFrame})
tween:Play()
tween.Completed:Wait()
end
end
end
This is just tweening code, are you using a script to play the sound?
i have issue that 1 song would play twice but 2nd time is bit off but it was studio only if its same issue then this isn’t that major
I’m not using a script. I’m using the Playing property.