Issues with animations

So, to preface this, I am not a scripter. I know little-to-nothing about scripting, or programming of any form. I hired a scripter, who has not made any changes, and or published my game. Everything was working perfectly fine – animations, and morphs.

When joining, you start out as your own character, in r15, with whatever your character has on at the time - including animations. Whenever in studios, everything works perfectly fine. Though, once in the actual game itself, everything breaks. Once morphed, you die, and once you run, the animation has weird ticks where it stops, and then continues at a random point.

Any tips? I am extremely lost.

Example of animations being weird. This should be the oldschool run.
(https://gyazo.com/d2f3a2c27b808115e40ad2fa069c80f5)

Can you send the script which runs the animations once you morph?

So, it’s any run animation that has to do with someone. Any run animation breaks, and I have no clue why. This has happened once before, and I don’t even know what I did to fix it.

How is the animation played? Without looking at the script, I cannot determine what the problem is.

1 Like

It’s just played through the normal avatar animation loader. Nothing is changed.

+When all the scripts are disabled, it still buggy

Is the game public so that I can test it?

Maybe it due to many parts?
Cuz when I delete all the parts in game, it works fine

1 Like

Are the events/variables handled properly after use? If not then it can cause memory leaks and lag

Wdym events handled properly?
(30char)

Are the events disconnected after it is used? (events such as Touched events)

Most scripts are under a part that tracks if the part is touched, I don’t think I should disconnect them. Like the morphs

Does having too much loops affect it. I have like 20 while true loops happening on the server

So there is one script for every morph in game?

Yep, should I just loop through all the morphs and detect if touched?

Yes, that would be more efficient. Also what do the while loops do?

Quarter of them are like leaderboards cross-server happening every minute

Can I see the loop code? -thirtychars-

Please wait a few minutes (30char)

while true do
	script.Parent.Parent.updateTime.SurfaceGui.TimeRemaining.Text = "- Updating... -"
	
	local Pages = DataStore:GetSortedAsync(false,10,1,10e30)
	CurrentPage = Pages:GetCurrentPage()
	
	--game.ReplicatedStorage.LeaderboardData:FireAllClients(CurrentPage)
	
	for rank,data in ipairs(CurrentPage) do --Rank
		local UserId = data.key
		local Points = data.value
		local User = "[Failed To Load #"..tostring(UserId).." ]"
		
		pcall(function()
			User = game.Players:GetNameFromUserIdAsync(UserId)
			if table.find(ignoreCache,UserId) then
				DataStore:RemoveAsync(UserId)
			end
		end)
		if rank == 10 then
			rank = 'last'
		end
		LeaderBoard.Frame[tostring(rank)].TextLabel.Text = User..":\n"..Convert_DHM(Points)

		UserId = nil
		Points = nil
		User = nil
	end

	Pages = nil
	--Wait 60 sec
	for i = 60,0,-1 do
		TimeBeforeNextReset = i
		script.Parent.Parent.updateTime.SurfaceGui.TimeRemaining.Text = "- Updating in "..tostring(i).." -"
		task.wait(1)
	end
	
	for _,plr in pairs(game.Players:GetPlayers()) do --Increment time
		--print("Set")
		local Succ,Err = pcall(function()
			if not table.find(ignoreCache,plr.UserId) then
				if plr:GetRankInGroup(groupId) < ignoreHigherThan then
					DataStore:IncrementAsync(plr.UserId,1)
				else
					table.insert(ignoreCache,plr.UserId)
				end
			end
		end)
	end
	
end
while true do
	local Pages
	local succ,err = pcall(function()
		Pages = Database:GetSortedAsync(false,5,1,10e30):GetCurrentPage()
	end)
	local Top = {}
	
	if succ then
		for rank,data in ipairs(Pages) do
			local UserId = data.key
			local Points = data.value
			local User = "[Failed To Load #"..tostring(UserId).." ]"
			
			local Succ,Err = pcall(function()
				User = game.Players:GetNameFromUserIdAsync(UserId)
			end)
			
			leaderboard[tostring(rank)].User.Text = User
			leaderboard[tostring(rank)].Amount.Text = tostring(Points)
			
			if rank <= TopPodium then --Eligible to appear
				if table.find(Top,UserId) then
					table.remove(Top,table.find(Top,UserId))
				end
				Top[rank] = UserId
			end
			
			UserId = nil
			Points = nil
			User = nil
		end
	end
	UpdatePodium(Top)
	for i = 60,1,-1 do
		script.Parent.Timer.SurfaceGui.TextLabel.Text = "- Updating in "..tostring(i).." -"
		task.wait(1)
	end
	script.Parent.Timer.SurfaceGui.TextLabel.Text = "- Updating... -"
end
while plr do
	wait(30)
	if plr.Character and not plr.Character.Head:FindFirstChild('Title') then
		CreateTag(plr,Role,Titles[Role],nil)
	end
end

The last loop is because the head and character sometimes wont detect correctly
Rest of the scripts are client side, which are aesthetics

However, if I still disable these loops, the bug still occurs. So its probably not due to these I think