Animation does not work in the group space

Animation works well in personal space
Animation does not work in the group space.
What’s the problem?
What authority issues are there?
And recently Roblox Studios is so unstable.



--//Created by PlaasBoer
--//Put the code in a local script then place it in StarterPlayer/StarterCharacterScripts
local keyPressed = Enum.KeyCode.G --Another example Enum.KeyCode.G
local animationId = "9592864916" --Change to your animation Id

local userInputService = game:GetService("UserInputService")
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://"..animationId
local animationTrack = humanoid:LoadAnimation(animation)

userInputService.InputBegan:Connect(function(input,isTyping)
	
	if isTyping then return end
	if input.KeyCode == keyPressed then
		print("GGGG")
		if not animationTrack.IsPlaying then
			animationTrack:Play()
	   else
			animationTrack:Stop()
    	end
	end
end)```
2 Likes

If the “group space” is not owned by you then it will not work, since you cant use other peoples animations.

2 Likes

Wrong category mate. Use scripting support for this post

If the animation is not inside the group then it won’t load on your games that are in the group, you will have to upload the animation to the group

humanoid:LoadAnimation() is deprecated, use local animationTrack = humanoid:WaitForChild("Animator"):LoadAnimation(animation)
plus this goes to #help-and-feedback:scripting-support

1 Like

I uploaded it back to the group, but it didn’t work.

thanks for reply

Try loading the animation id directly into the line like this:

And @Mister33j suggestion for loading in the animator first is protocol for animations now so that stays in regardless of your solution.

1 Like