How to make a FRAME for the full screen?

What’s wrong with my script? I need to reproduce an animation that I buy in the catalog, it is exactly this: (29) Celebrando - Roblox

how could i fix that? please someone help me

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait() -- get the player's character
	local humanoid = character:FindFirstChildOfClass("Humanoid") -- get their humanoid

	local dance = Instance.new("Animation")
	dance.AnimationId = "rbxassetid://3994127840" -- Celebrate Celebrando plays

	local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid) -- find the animator or create a new one
	local danc = animator:LoadAnimation(dance)
	danc:Play() -- play the animation
end)

Well, don’t use Animator.
You can just use humanoid:LoadAnimation()

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait() -- get the player's character
	local humanoid = character:FindFirstChildOfClass("Humanoid") -- get their humanoid

	local dance = Instance.new("Animation")
	dance.AnimationId = "rbxassetid://3994127840" -- Celebrate Celebrando plays
	local danc = humanoid:LoadAnimation(dance)
	danc:Play() -- play the animation
end)

Humanoid:LoadAnimation is deprecated

@PipeSader
Change

To

dance.AnimationId = "rbxassetid://3338097973"

You don’t need to buy animations to use them.

1 Like

Ohhh, but for me humanoid:LoadAnimation() works fine :thinking:

Of course, they didn’t remove it to prevent old scripts from breaking but they just discourage using it for new things

1 Like

Yeah, I’ll try this now thanks for this post. Didn’t know about this :flushed:

1 Like

where did you take that id? i need to know :frowning: i have 7 buttons with anims to fix

I use BTRoblox which is a plugin for the roblox website
It allows me to see the things inside of an asset

image

The AnimationId is the ID for the actual animation that’s being played

2 Likes

thanks you a lot! :scream: :smiley:

1 Like