I have a script that plays an animation when the player gets near the model, but I want the model to remain in pose after animation finishes playing. Here's the script:

local Players = game:GetService("Players")

local Main = script.Parent
local Humanoid = Main:FindFirstChildOfClass("Humanoid")

local Range = 7 -- Range
local Check = true -- Debouncer

local PlayAnimation = function(AnimationID) -- Play Animation Function
	local Animation = Instance.new("Animation")
	Animation.AnimationId = ("rbxassetid://%s"):format(AnimationID)

	local Track = Humanoid:LoadAnimation(Animation) -- Loads Anim
	Track:Play()   
end

while wait() and Check do
	for _,Player in next, Players:GetPlayers() do
		local Char = Player.Character or Player.CharacterAdded:wait() 
		local HumanoidRootPart = Char:FindFirstChild('HumanoidRootPart')
		local A,B = HumanoidRootPart.Position, Main.HumanoidRootPart.Position

		local Dist = (A - B).Magnitude
		if Dist <= Range then 
			PlayAnimation(6130983003)
			Check = false
			wait(70)
			Check = true
		end
	end
end

2 comments

0

make the animation 10 hours of just you posing there

0

or you can just make another animation with the ending pose alone and loop it