I made this script to sync a part, with music, and it works completely perfect in studio, but in the actual game it doesn't wanna work.

And there is no error.

local tweenServ = game:GetService("TweenService")

local music = workspace:WaitForChild("Music")
music:Play()

while wait(0.5) do
	
	local bass = math.ceil(music.PlaybackLoudness)
	
	local part = workspace:WaitForChild("Baseplate")
	local goal = {}
	goal.Orientation = Vector3.new(bass*0.25,bass*0.50,bass*0.75)
	goal.Color = Color3.fromRGB(bass*0.25,bass*0.50,bass*0.75)
	goal.Size = Vector3.new(bass,bass,bass)

	local tweenInfo = TweenInfo.new(0.5)
	local tween = tweenServ:Create(part, tweenInfo, goal)
				
	tween:Play()
	
end

2 comments

0

Where is this in? If its a LocalScript and is in workspace it wont work in the actual game(it probably isnt). Check this link to see if u can find ur problem. Link: https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online

0

it is in a regular script, and in a part in workspace, I know how scripting works, I just need to know why this isn't working online, I prefer someone that has worked with tweenservice alot help me.