NotAid_n
(NotAid_n)
May 11, 2021, 11:53am
1
I’m trying to make a menu with a cool animation thing and I need it to close whenever the menu is closed.
6800622210 is the animation ID
I can’t seem to get this to work.
I’ve tried a few things, but all of them have failed. (yes I know this is simple but I forgot how to play animations soooooooo yeah)
--define the animation and animation id here, then play the animation normally.
while wait() do
if Menu.Visible == false then
--stop the animation here
break
end
end
1 Like
thats a simple way to do it, don’t know if that’s what you’re going for, though.
NotAid_n
(NotAid_n)
May 11, 2021, 12:01pm
4
Is that a local or server side script?
synical4
(Synical)
May 11, 2021, 12:02pm
5
I assume local since you should never handle anything to do with guis on the server.
typically same for animations lol
2 Likes
Is it an animation or a tween? That makes a big difference in what you want to do.
NotAid_n
(NotAid_n)
May 11, 2021, 12:07pm
8
Animation. It gets the player and puts it in a frame. So i have to change the player’s animation and walkspeed.
Can you “re-explain” the whole process for me? It puts the character in a viewport frame then plays the animation on the character in the viewport?
If the issue is that the animation is not playing inside of a VPF then you need to have a world model inside of the VPF then the character inside of the world model
NotAid_n
(NotAid_n)
May 11, 2021, 12:09pm
11
Yes, it takes a viewport of your avatar
NotAid_n
(NotAid_n)
May 11, 2021, 12:10pm
12
It’s playing inside the frame, I’m trying to get it to play the right animation.
1 Like
Something like this?
local viewPortChar = script.Parent.ViewportFrame.CharacterModel
local anim = viewPortChar.Humanoid:LoadAnimation(anim)
Menu.Changed:Connect(function()
if Menu.Visible == false then
anim:Play()
end
end)
NotAid_n
(NotAid_n)
May 11, 2021, 12:12pm
14
It’s the real player though. Not a model.
Clone the real player, delete the Animate script then put the cloned player inside of the viewport frame.
1 Like
NotAid_n
(NotAid_n)
May 11, 2021, 12:13pm
16
Nevermind my other developer is fixing it