Animations seemingly impossible to get working

  1. What do you want to achieve? I would like to get my custom sit animation playing, and to restore my other one to its former state.

  2. What is the issue? My custom sit animation will not play under any circumstance, upon rebooting roblox studio my only other animated chair now doesn’t work either.

  3. What solutions have you tried so far? I’ve tried multiple different sit animation scripts, I’ve changed the priority multiple times, I’ve reuploaded the animation, I’ve imported the animation to different r6 rigs, I recreated the animation on new rigs incase it was the problem, I’ve tested on the roblox app and not just studio, I’ve gone into the avatar settings of the game to make sure they align with the rig I created the animation on, I’ve sought out others on seperate forums for help to no avail, I’ve tried it on other games as well - games where I used the script in the past it worked and it did, in new workspaces it just wont.
    The script on one of my chairs:

Script 1
-- local id = "rbxassetid://113784567002281" -- Change this ID with your animation ID

game.Players.PlayerAdded:Connect(function(plr) 
	plr.CharacterAdded:Connect(function(character)
		local humanoid = character:FindFirstChild("Humanoid")

		humanoid.Parent.Animate.sit.SitAnim.AnimationId = id

	end)
end)


My second chair script, ignore the welding as that is because it moves, broke after I restarted:

Script 2
seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			anim = human:LoadAnimation(seat.sitanim)
			anim:Play()
		end
	 end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)
1 Like

I tried putting the rig I created the animation on into the game as the starter character and only then does it work, I’m confused as the game is set to r6 so it should work on every character??

Because that’s how the animate script from Roblox works, fork it or use a custom one.
A temporary solution could be copying and deleting the animate script and pasting it back to the character.

Also, please do not use global variables or global functions.

There are two places that I update the animations when working in Animate, that is the .sit.SitAnim.AnimationId and inside of the Animate module, right here:

local animNames = { 
	-- ...

	climb = {
		{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } 
	}, 

	sit = {
		{ id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 }  --< This line
	},	

	toolnone = {
		{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } 
	},

    -- ...
}

Get the Animate script from the Character when you load into the game, change those two, and let me know if that works :folded_hands: