Im New on scripiting, i watched a video of how to change the animation of a seat, but dont know if i im right on the script, and where to put the script?

local seat = script.Parent local CAR3 = seat.CAR3 local CAR3Anim

seat.Changed:Connect(function(property)

if property ~= "Occupant" then return end

local occupant = seat.Occupant

if occupant then local character = occupant.Parent local humanoid = character.Humanoid local player = game.Players:GetPlayerFromCharacter(character) elseif player then CAR3Anim = humanoid:LoadAnimation(CAR3) CAR3Anim:Play() end elseif CAR3Anim then CAR3Anim:Stop() end end)

Probably everything is wrong on the script, but im new on this