Hello, I'm trying to do a script but it dont work, I want that when someone touches the brick check if you have the badge and run the movement. What is wrong with this script?

BadgeId = 484963036

script.Parent.Head.Touched:connect(function(hit)
    if game:GetService("BadgeService"):UserHasBadge(hit.userId, BadgeId) then
        script.Parent.Position = Vector3.new(20.063, 0.76, 24.606)
    else
        script.Parent.Position = Vector3.new(20.063, -10, 24.606)
    end
end)