Change player animation on trigger overlap

Hi, when the player overlaps the trigger object i want the player to change its animation.
This is the script i have so far..

local TRIGGER = script:GetCustomProperty("trigger"):WaitForObject()
local GEO = script:GetCustomProperty("GEO"):WaitForObject()
local ROTATE = script:GetCustomProperty("rotate")
local player = Game.GetLocalPlayer()

GEO:RotateContinuous(ROTATE)

function Pickup()
print (player.name)
player:PlayAnimation("unarmed_dance_basic")
end

TRIGGER.beginOverlapEvent:Connect(Pickup)

I receive this error warning..
Error running Lua task: [7F1EE80E63D74E36] PickUpScript:12: attempt to call a nil value (method 'PlayAnimation')

Any help is greatly appreciated.

A little late but i think for player you need to use

player.animationStance = "unarmed_dance_basic"

and it can't be client context so no GetLocalPlayer() but you don't need it for this.

function Pickup(trigger, other)
if other:IsA("Player") then
print(other.name)
other.animationStance = "unarmed_dance_basic"
end
end