local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://925014782"
local trackanimation = nil
script.Parent.Touched:connect(function(hit)
local Player=game.Players:GetPlayerFromCharacter(hit.Parent)
if Player==nil then return end
trackanimation = Player.Character.Humanoid:LoadAnimation(animation)
trackanimation.KeyframeReached:connect(function()
print('Working')
end)
trackanimation:Play()
end)
How can I make it so when a player sits on the seat that the player is given an animation?
