So, In my game I have a coffee machine, and when the player puts the mug in it, it fills it up with coffee. I need a way to freeze the player while the fill-up animation is playing. I've tried anchoring the gear but that didn't work. I need a script that will take the player inserting the mug and freeze during the animation. Here is my current script.
script.Parent.Touched:connect(function(h)
if h.Parent.Name == "Mug" then
h.Parent.Name = "Waiting"
script.Parent.Parent.tea.Transparency = 0
wait(3)
script.Parent.Parent.tea.Transparency = 1
h.Parent.Name = "Tea"
h.Parent.tea.Transparency = 0
end
end)

2 comments
just make their walkspeed and JumpPower equal to 0
and anchor there character