local function Activated()
if Toggled == false then
Toggled = true
local animTrack1 = Humanoid:LoadAnimation(Animation1)
animTrack1:Play()
wait(1.45)
local animTrack2 = Humanoid:LoadAnimation(Animation2)
animTrack2:Play()
wait(29.95)
else
Toggled = false
local animTrack3 = Humanoid:LoadAnimation(Animation3)
animTrack3:Play()
wait(1.25)
local ActiveTracks = Humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
if v.Name == Animation1 or Animation2
then
v:Stop()
end
end
end
end
Button.Activated:Connect(Activated)
This script was meant to make the character play an animation after the player presses the GUI button, but the player is still able to move while the animation is playing, is there some way i can make the player unable to move during the animations?
And if you can please give me a feedback of my script, any help is appreciated.

2 comments
Edit : I didn't really look at your code cuz I'm lazy to do so. Sorry if this doesn't help!
It worked perfectly!Thank you so much!